コード例 #1
0
        public void SetView(string to)
        {
            if (!_views.ContainsKey(to))
            {
                Debug.LogWarning("<color=yellow>[ViewManagement] SetView() -> No view with key '" + to + "' was found.</color>");
                return;
            }

            if (ActiveView)
            {
                ActiveView.Deactivate();
                ActiveView.gameObject.SetActive(false);
            }

            ActiveView = _views[to];
            ActiveView.gameObject.SetActive(true);
            ActiveView.Activate();
        }