private void OnEnable()
        {
            this.titleContent             = Styles.TitleContent;
            this.wantsMouseMove           = true;
            this.autoRepaintOnSceneChange = true;


#if ENABLE_PROFILER_STATES
            m_attachProfilerState = ConnectionUtility.GetAttachToPlayerState(this);
#endif

            if (m_treeViewState == null)
            {
                m_treeViewState = new TreeViewState();
            }
            m_hierarchyTreeView = new HierarchyTreeView(m_treeViewState);


            Reload();
            if (m_searchField == null)
            {
                m_searchField = new SearchField();
                m_searchField.downOrUpArrowKeyPressed += hierarchyTreeView.SetFocusAndEnsureSelectedItem;
            }
        }
예제 #2
0
        private void OnEnable()
        {
#if UNITY_2020_1_OR_NEWER
            m_attachProfilerState = ConnectionUtility.GetConnectionState(this);
#else
            m_attachProfilerState = ConnectionUtility.GetAttachToPlayerState(this);
#endif
            UnityEditor.Networking.PlayerConnection.EditorConnection.instance.Initialize();
            UnityEditor.Networking.PlayerConnection.EditorConnection.instance.Register(UnityChoseKun.kMsgSendPlayerToEditor, OnMessageEvent);
            UnityEditor.Networking.PlayerConnection.EditorConnection.instance.RegisterConnection(OnConnection);
            UnityEditor.Networking.PlayerConnection.EditorConnection.instance.RegisterDisconnection(OnDisConnection);


            onGUILayoutFuncDict = new Dictionary <string, Action>()
            {
                { "Inspector", inspectorView.OnGUI },
                { "Component", objectCounterView.OnGUI },
                { "Texture", texturesView.OnGUI },
                { "Shader", shaderView.OnGUI },
                { "Sprite", spritesView.OnGUI },
                { "SortingLayer", sortingLayerView.OnGUI },
                { "Screen", screenView.OnGUI },
                { "Time", timeView.OnGUI },
                { "Application", applicationView.OnGUI },
                { "Android", androidView.OnGUI },
                { "Quality", qualitySettingsView.OnGUI },
                { "OnDemandRendering", onDemandRenderingView.OnGUI },
                { "ScalableBuffer", scalableBufferManagerView.OnGUI },
                { "SystemInfo", systemInfoView.OnGUI },



                // 機能をここに追加していく
            };

            onMessageFuncDict = new Dictionary <UnityChoseKun.MessageID, OnMessageFunc>()
            {
                { UnityChoseKun.MessageID.ScreenPull, screenView.OnMessageEvent },
                { UnityChoseKun.MessageID.TimePull, timeView.OnMessageEvent },
                { UnityChoseKun.MessageID.GameObjectPull, inspectorView.OnMessageEvent },
                { UnityChoseKun.MessageID.ShaderPull, shaderView.OnMessageEvent },
                { UnityChoseKun.MessageID.TexturePull, texturesView.OnMessageEvent },
                { UnityChoseKun.MessageID.ApplicationPull, applicationView.OnMessageEvent },
                { UnityChoseKun.MessageID.AndroidPull, androidView.OnMessageEvent },
                { UnityChoseKun.MessageID.QualitySettingsPull, qualitySettingsView.OnMessageEvent },
                { UnityChoseKun.MessageID.OnDemandRenderingPull, onDemandRenderingView.OnMessageEvent },
                { UnityChoseKun.MessageID.ScalableBufferManagerPull, scalableBufferManagerView.OnMessageEvent },
                { UnityChoseKun.MessageID.SystemInfoPull, systemInfoView.OnMessageEvent },
                { UnityChoseKun.MessageID.SpritePull, spritesView.OnMessageEvent },
                { UnityChoseKun.MessageID.SortingLayerPull, sortingLayerView.OnMessageEvent },
                // 機能をここに追加していく
            };
        }
        void OnEnable()
        {
#if UNITY_2018_1_OR_NEWER
            if (attachProfilerState == null)
            {
#if UNITY_2020_1_OR_NEWER
                attachProfilerState = ConnectionUtility.GetConnectionState(this);
#else
                attachProfilerState = ConnectionUtility.GetAttachToPlayerState(this);
#endif
            }
#endif
            EditorConnection.instance.Initialize();
            EditorConnection.instance.Register(UnityMemoryProfilerSupportKunClient.kMsgSendPlayerToEditor, OnMessageEvent);
        }
예제 #4
0
        //
        private void OnEnable()
        {
            if (window == null)
            {
                window = (PlayerViewKunEditorWindow)EditorWindow.GetWindow(typeof(PlayerViewKunEditorWindow));
            }
            if (attachProfilerState == null)
            {
#if UNITY_2020_1_OR_NEWER
                attachProfilerState = PlayerConnectionUtility.GetConnectionState(this);
#else
                attachProfilerState = PlayerConnectionUtility.GetAttachToPlayerState(this);
#endif
            }
        }
        private void OnEnable()
        {
            if (attachProfilerState == null)
            {
#if UNITY_2020_1_OR_NEWER
                attachProfilerState = ConnectionUtility.GetConnectionState(this);
#else
                attachProfilerState = ConnectionUtility.GetAttachToPlayerState(this);
#endif
            }
            UnityEditor.Networking.PlayerConnection.EditorConnection.instance.Initialize();
            UnityEditor.Networking.PlayerConnection.EditorConnection.instance.Register(UnityProfilerLiteKun.kMsgSendProfileDataPlayerToEditor, OnProfileDataEvent);
            UnityEditor.Networking.PlayerConnection.EditorConnection.instance.Register(UnityProfilerLiteKun.kMsgSendMessagePlayerToEditor, OnMessageEvent);
            if (frameCountMax <= 0)
            {
                frameCountMax = 999999;
            }
        }
        private void OnEnable()
        {
#if ENABLE_PROFILER_STATES
            m_attachProfilerState = ConnectionUtility.GetAttachToPlayerState(this);
#endif

            if (treeViewState == null)
            {
                treeViewState = new TreeViewState();
            }

            Reload();
            if (m_searchField == null)
            {
                m_searchField = new SearchField();
                m_searchField.downOrUpArrowKeyPressed += hierarchyTreeView.SetFocusAndEnsureSelectedItem;
            }
        }
        //
        private void OnEnable()
        {
            if (window == null)
            {
                window = (PlayerViewKunEditorWindow)EditorWindow.GetWindow(typeof(PlayerViewKunEditorWindow));
            }
            if (attachProfilerState == null)
            {
#if UNITY_2020_1_OR_NEWER
                attachProfilerState = PlayerConnectionUtility.GetConnectionState(this);
#else
                attachProfilerState = PlayerConnectionUtility.GetAttachToPlayerState(this);
#endif
            }
            UnityEditor.Networking.PlayerConnection.EditorConnection.instance.Initialize();
            UnityEditor.Networking.PlayerConnection.EditorConnection.instance.Register(PlayerView.kMsgSendPlayerToEditor, OnMessageEvent);
            UnityEditor.Networking.PlayerConnection.EditorConnection.instance.Register(PlayerView.kMsgSendPlayerToEditorHeader, OnMessageEventHeader);
            UnityEditor.Networking.PlayerConnection.EditorConnection.instance.RegisterConnection(OnConnection);
        }
예제 #8
0
        /// <summary>
        ///
        /// </summary>
        private void OnEnable()
        {
            if (m_scriptNames == null)
            {
                m_scriptNames = new List <GUIContent>();
            }

            if (m_scriptNoValues == null)
            {
                m_scriptNoValues = new List <int>();
            }

            UnityEditor.Networking.PlayerConnection.EditorConnection.instance.Initialize();
            UnityEditor.Networking.PlayerConnection.EditorConnection.instance.Register(RemoteMessageBase.kMsgSendPlayerToEditor, OnMessageEvent);

#if UNITY_2020_1_OR_NEWER
            m_connectionState = ConnectionUtility.GetConnectionState(this);
#else
            m_connectionState = ConnectionUtility.GetAttachToPlayerState(this);
#endif
        }