In the documentation many details are not covered.
Excuse me if many concerns starts from my poor knowledge about how things works internally I’m just asking based on what I learned from documentation.
Apart from reference in state machines there is another way to make an entity not active at level start?
The Activated Deactivated state of an entity rises a lot of questions and needs to be covered in details.
Do entities lua state get manteined or get resetted on deactivation?Es if I put self.var = 10; and the entity get resetted will self.var be set when if it get activated again?
It’s safe to init object state in OnActivate if it could not be called before I try to access this state elsewhere?
What really happens to a deactivated entity?
How State machine components manage activations and deactivations?
Do they get activated , deactivated syncronously as soon as I change state or in a deferred way I have to expect a one frame lag for activation and or deactivation?es if I activate a state in frame x will the tick be called for the entities just from frame x or from x+1?
What happens if I reference deactivated object from anywhere else?es sending a bus event while they are not active do I have to check first for their state or I have just to expect things could fail silently?
What if C was initially inactive per A and B and A get in a state where C is active it is activated or not?
What if C was instead initially active per A and B and A get in a state where C is inactive it is deactivated or not?
These two Questions get even more complex if we think that A and B can change state in the same frame and so then C.
I think we at least need some best pratices to stick with to be able to share gems around with other people or this could open the way to a huge amount of bugs.
If there are some constraints that makes possible a safe workflow where I can make assumptions and skip some redundant check they need to get documented in a very detailed way.