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
↧