I have a scenario where I spawn several objects that initially are turned off via SetActiveRecursively( false ). These objects are compositions of one parent and one to four children. Each child contains a mesh and each parent is attached to a global level object. ie the hierarchy looks like this:
container 1, 1
mesh container 2, 1
When the player hits a certain trigger, these inactive objects are activated via a method which calls SetActiveRecursively( true ). At this point the container objects are indeed activated, however the children of these container objects are not.
The strange thing is that when stepping through the code in the debugger, the children’s active property is set to true. In the unity editor however, the active checkbox of the child objects is still set to false.
I’ve tried manually iterating over the children and calling SetActiveRecursively( true ) but that didn’t have any effect.
Does anyone have an idea what may prevent the children from activating ?