Quantcast
Channel: Questions in topic: "hideflags"
Viewing all articles
Browse latest Browse all 117

HideFlags.HideInHierarchy not updating hierarchy in Edit-mode

$
0
0
Hey there guys. So here is the deal: I made a window to allow me to quickly hide and unhide objects in my hierarchy. Here it is: ![alt text][1] [1]: /storage/temp/82297-window.png Yeah.... I'm making a MLG-style-game. Dont judge me :P Alright. So to hide my objects I use this: foreach (GameObject effect in GameObject.FindGameObjectsWithTag("Effect")) { effect.SetActive (false); if (effectsVisible) effect.hideFlags = HideFlags.None; else effect.hideFlags = HideFlags.HideInHierarchy; effect.SetActive (true); Repaint (); EditorApplication.RepaintHierarchyWindow (); } This is the "Effects visible" button. This should work but... it doesnt really. The hierarchyjust doesnt update when I press the button, It does however update when I close and reopen it. Then my Hideflags are set correctly. Is there a way to reload the hierarchy via script or to set the hideflags in a way that automatically updates the hierarchy? Thanks in advance guys :D

Viewing all articles
Browse latest Browse all 117

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>