Hi I used to be able to set the parent game object to active or inactive in editor by clicking the checkbox and it would ask me if I wanted to set the child objects to active or inactive. It no longer does this and I have to manually expand each child object and set it to active/inactive which takes forever if you have many child objects.
Use this Editor script. Works a treat and saved me a lot of work!
using UnityEngine;
using UnityEditor;
/// <summary>
/// Select the parent object and run this to set all the child objects as
/// active.
/// </summary>
public class SetAllChildObjectsActive
{
[MenuItem ("GameObject/Set All Child Objects Active")]
static void SetChildObjectsActive()
{
Selection.activeGameObject.SetActiveRecursively(true);
}
}
One you’ve added it, just select the parent object in the hierarchy and select menu item ‘GameObject/Set All Child Objects Active’. You can then just set the parent as inactive afterwards, which will follow through to the children.