41 lines
841 B
C#
41 lines
841 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class Temp_ClearHidden : MonoBehaviour
|
|
{
|
|
public List<GameObject> m_Hide = new List<GameObject>();
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
|
|
[ContextMenu("Get Hide")]
|
|
void GetHide()
|
|
{
|
|
m_Hide = new List<GameObject>();
|
|
for (int i = 0; i < transform.childCount; i++)
|
|
{
|
|
GameObject go = transform.GetChild(i).gameObject;
|
|
if(!go.activeInHierarchy)
|
|
m_Hide.Add(go);
|
|
}
|
|
}
|
|
|
|
[ContextMenu("Clear Hide")]
|
|
void Clear()
|
|
{
|
|
for (int i = 0; i < m_Hide.Count; i++)
|
|
{
|
|
DestroyImmediate(m_Hide[i]);
|
|
}
|
|
}
|
|
}
|