Prevent shapes creation on disabled entities (#3432)
Prevent shapes creation on disabled entities (#3432)

Currently a SceneParser will initialize Collision Component and execute its `afterInitialize()` method. This in turn calls the `recreatePhysicalShapes(component)`, which destroys old collision data and generates new collision shapes in the physics world, regardless if the entity/component is enabled or not. If the entity is not enabled, the shapes are created only to be immediately destroyed afterwards. As a result, if a scene contains many entities with collision component, they all get processed on start, even if disabled.

This PR adds a check if both entity and component are enabled, before destroying old collision data and generating a new one.
MicroWorldwide/PlayCanvas,playcanvas/engine,playcanvas/engine,MicroWorldwide/PlayCanvas