- Home /
2019 Scene visibility - scripting access
Unity 2019 has a new feature, allowing to hide parts of the scene without actually modifying it in any way. However this doesn't work for custom renderers. What i'd need is a way how to read wheter the GameObject is visible or not, so I can skip the custom rendering in the script. I couldn't find any scripting reference to the new feature, any ideas?
Answer by Danshiel · Jun 09, 2020 at 06:13 PM
The class SceneVisibilityManager available since Unity 2019.2 is the way of go.
SceneVisibilityManager.instance.Hide( myGameObject , true );
And to check visibility, I could use SceneVisibility$$anonymous$$anager.IsHidden
I guess. Thanks
Answer by shubh143 · Jul 02, 2019 at 02:09 PM
with gameobject.activeInHierarchy function you can check whether gameobject is visible or not.
Well no, that will tell me if it's active or not. What I mean is the new 2019 feature where you can hide gameObjects without changing their active state
Your answer
Follow this Question
Related Questions
How do you make a mesh visible to certain cameras? 1 Answer
Look at Object 1 Answer
Hide Object in Editor Only 5 Answers
Cursor locking and visibility. 0 Answers
[UNET] How to do custom visibility for card games. 0 Answers