Unity3D2Babylon.ExporterWindow.OnEnable C# (CSharp) 메소드

OnEnable() 공개 메소드

public OnEnable ( ) : void
리턴 void
        public void OnEnable()
        {
            this.titleContent = new GUIContent("Exporter");
            if (ExporterWindow.exportationOptions == null)
            {
                ExporterWindow.exportationOptions = CreateSettings();
            }
            // Attach unity editor buttons
            UnityEditor.EditorApplication.playmodeStateChanged = () =>
            {
                if (exportationOptions != null && exportationOptions.AttachUnityEditor)
                {
                    bool wantsToPlay = UnityEditor.EditorApplication.isPlayingOrWillChangePlaymode;
                    bool wantsToPause = UnityEditor.EditorApplication.isPaused;
                    if (wantsToPlay || wantsToPause)
                    {
                        UnityEditor.EditorApplication.isPlaying = false;
                        UnityEditor.EditorApplication.isPaused = false;
                    }
                    if (wantsToPlay) Execute();
                }
            };
            // Activate asset store window
            if (this.assetStore == null)
            {
                this.assetStore = Tools.GetAssetStoreWindow();
            }
            // Activate internl web server
            this.StartServer();
        }