void Awake() { instance = this; BasePanel[] ps = GetComponentsInChildren <BasePanel>(true); panels.Clear(); for (int i = 0; i < ps.Length; i++) { panels.Add(ps[i]); } }
void OnDestroy() { instance = null; }