For the sake of optimization, I want my actor based blueprints to be disabled in game by default, so that I get no Tick events from them at all. (I may enable them later, whenever I need…)
I try using Set Actor Hidden In Game in Construction Script, but nothing happens. Blueprints continue receiving Tick Events as usual
You can use a gate to consume the tick input so it does nothing until you open the gate. They will receive the tick event but it will not do anything until you tell it to.
As I have hundreds (!) of blueprints doing their own things in tick events, it means that I also have same amount of receive tick events for each blueprint, even if their executions are gated. So, I am looking for a method that completely removes blueprints from tick event queue, which is I think essential for performance critical issues.
Something similar to PrimaryActorTick.bStartWithTickEnabled = false; that is used in FTickFunction (C++) is the thing that I’m asking for.
Is there a way that we can disable an actor based blueprint completely (no ticks, no collision, no rendering, etc), and enable again when necessary?
Unfortunately the best option in this case would be to destroy the actor and re-spawn it when you need the actions that blueprint has. Otherwise, gates and branches to prevent your actor from completing its functions are the viable solution.