Hello!
Im currently trying to hide a few objects at Hierarchy IDE and after searching in the documentation, I found this link (Unity - Scripting API: HideFlags.HideInHierarchy) which should solve my problem, but after a couple of tries, I still cant manage to hide anything!
This is the code im using to attempt to hide a predetermined object:
public static void HideObjects( bool isTheSameObject )
{
ColorPicker[] getObjects = GameObject.FindObjectsOfType(typeof(ColorPicker)) as ColorPicker[];
for (int i = 0; i < getObjects.Length; i++)
{
Debug.Log ("Object Name: "+getObjects_.name+". HideFlags: "+getObjects*.hideFlags);*_
* if (isTheSameObject)*
* {*
_ getObjects .hideFlags = HideFlags.HideInHierarchy;
* }
}
}*
The Log tells me that the list is in fact getting the right objects. This method is being called at OnGUI by a script extended by EditorWindow.
What am I doing wrong?
Thank you so much for your help!_