示例#1
0
        private void OnGUI()
        {
            if (!isShow)
            {
                return;
            }

            using (var sv = new GUILayout.ScrollViewScope(this.scrollPosition)) {
                using (new GUILayout.HorizontalScope(GUI.skin.box)) {
                    this.scrollPosition = sv.scrollPosition;

                    using (new GUILayout.VerticalScope(GUILayout.Width(100))) {
                        Util.ForEach(this.monos, (name, mono) => {
                            if (GUILayout.Button(name))
                            {
                                this.current = mono;
                            }
                        });
                    }
                    using (new GUILayout.VerticalScope(GUILayout.Width(Screen.width - 150))) {
                        if (this.current)
                        {
                            this.current.OnDebug();
                        }
                    }
                }
            }
        }
示例#2
0
        public void Discard(MyMonoBehaviour mono)
        {
#if _DEBUG
            string name = mono.GetType().Name;

            if (this.monos.ContainsKey(mono.GetType().Name))
            {
                this.monos.Remove(name);
            }
#endif
        }
示例#3
0
        public void Regist(MyMonoBehaviour mono)
        {
#if _DEBUG
            this.monos.Add(mono.GetType().Name, mono);
#endif
        }