using UnityEngine; using System.Collections; public class ViewStack : View { public View[] viewArr; protected virtual void Awake () { viewArr = new View[transform.childCount]; for(int i=0; i (); if (view == null) view = trans.gameObject.AddComponent (); viewArr [i] = view; } } protected override void OnInitCompleted () { if (m_ViewIndex == -1) viewIndex = 0; } private int m_ViewIndex = -1; public int viewIndex { set{ if (m_ViewIndex == value) return; for(int i=0; i