Thank you very much, I’ll look into it and try to implement some optimization system.
[HR][/HR]There is one problem though: It’s hard to deactivate an actor in UE. Even after deactivating all components, disabling tick & collision + setting ‘Hidden In Game’, it still eats Game ms.
For example, I spawn 200 characters in level, deactivate them and I get around 20 Game ms. When I don’t spawn them or destroy them, I get around 10 Game ms.
… And I can’t get any close to that 10 ms level after deactivating them. What I’ve done:
- For ALL Components: Deactivate, Set Visibility to FALSE, Set Collision to ‘No Collision’
- Set Actor Tick Enabled to FALSE, Set Actor Hidden In Game to HIDDEN, Set Actor Enable Collision to FALSE.
What else can be deactivated to truly deactivate an actor? I remember that in Unity there is a simple deactivation function that completely ‘shuts down’ any game object. I’m trying to recreate that…
For example, CPU Profiling (‘stat game’ command) says that ‘Char Movement Total’ eats up to 3ms (instead of 0.4ms when only player is active) even after I disable MovementComponent on ALL spawned characters! Something is wrong…