When I move the player character indoors in one of my scenes and switch from one camera to another I want to hide some outdoor object sand unhide some indoor objects that occlusion culling does not take care of for me due to some windows in the walls. Because of this I want to toggle their visibility in an actionlist for performance reasons. I start outside in this scene so the objects indoors are already invisible from the start. When moving inside the objects outside switch to invisible as expected, but the objects inside remain hidden. When walking outside the objects outdoors became visible again (as expected) so I am somewhat confused.
Right now I solved the issue by turning the indoor objects off when starting the scene but I would like to know why this command seems not able to unhide invisible objects in the scene for better understanding.
I use the object visibility command and make it affect all children. What I noticed is that AC adds an Constant ID to the objects that are already turned off in my hierarchy but does not do this to the objects that are visible from the start.
Comments
If the Actions and components that work look similar to those that don't, check that the Actions are actually running. You can insert an "ActionList: Comment" Action to send a message to the Console when appropriate to debug this.
An object's initial visibility state should not affect the effect of Actions - though the "enabled" state of the GameObject itself will.
To save the visibility state of a mesh, however, you need a Remember Visibility component - see Section 9.2 of the Manual.
You should find that a "save" icon appears next to any object with such a component in the Hierarchy - it doesn't appear to be the case here.
However, you also have disabled the LightRay GameObject - which can cause problems as Unity has difficulty "finding" such objects again in code. For this reason, don't disable GameObjects when unwanted, but instead move them out of the way or disable the components within them.