예제 #1
0
 internal void SwitchToAssetMode()
 {
     using (List <AvatarEditor.SceneStateCache> .Enumerator enumerator = this.m_SceneStates.GetEnumerator())
     {
         while (enumerator.MoveNext())
         {
             AvatarEditor.SceneStateCache current = enumerator.Current;
             if (!((UnityEngine.Object)current.view == (UnityEngine.Object)null))
             {
                 current.view.m_SceneViewState.showFog            = current.state.showFog;
                 current.view.m_SceneViewState.showFlares         = current.state.showFlares;
                 current.view.m_SceneViewState.showMaterialUpdate = current.state.showMaterialUpdate;
                 current.view.m_SceneViewState.showSkybox         = current.state.showSkybox;
             }
         }
     }
     this.m_EditMode = AvatarEditor.EditMode.Stopping;
     this.DestroyEditor();
     this.ChangeInspectorLock(this.m_InspectorLocked);
     if (!EditorApplication.isUpdating && !Unsupported.IsDestroyScriptableObject((ScriptableObject)this))
     {
         if (SceneManager.GetActiveScene().path.Length <= 0)
         {
             if (this.sceneSetup != null && this.sceneSetup.Length > 0)
             {
                 EditorSceneManager.RestoreSceneManagerSetup(this.sceneSetup);
                 this.sceneSetup = (SceneSetup[])null;
             }
             else
             {
                 EditorSceneManager.NewScene(NewSceneSetup.DefaultGameObjects);
             }
         }
     }
     else if (Unsupported.IsDestroyScriptableObject((ScriptableObject)this))
     {
         // ISSUE: object of a compiler-generated type is created
         // ISSUE: variable of a compiler-generated type
         AvatarEditor.\u003CSwitchToAssetMode\u003Ec__AnonStorey9C modeCAnonStorey9C = new AvatarEditor.\u003CSwitchToAssetMode\u003Ec__AnonStorey9C();
         // ISSUE: reference to a compiler-generated field
         modeCAnonStorey9C.\u003C\u003Ef__this = this;
         // ISSUE: reference to a compiler-generated field
         modeCAnonStorey9C.CleanUpSceneOnDestroy = (EditorApplication.CallbackFunction)null;
         // ISSUE: reference to a compiler-generated field
         // ISSUE: reference to a compiler-generated method
         modeCAnonStorey9C.CleanUpSceneOnDestroy = new EditorApplication.CallbackFunction(modeCAnonStorey9C.\u003C\u003Em__1C9);
         // ISSUE: reference to a compiler-generated field
         EditorApplication.update += modeCAnonStorey9C.CleanUpSceneOnDestroy;
     }
     this.m_GameObject = (GameObject)null;
     this.m_ModelBones = (Dictionary <Transform, bool>)null;
     this.SelectAsset();
     if (this.m_CameFromImportSettings)
     {
         return;
     }
     this.m_EditMode = AvatarEditor.EditMode.NotEditing;
 }
예제 #2
0
 internal void SwitchToAssetMode()
 {
   using (List<AvatarEditor.SceneStateCache>.Enumerator enumerator = this.m_SceneStates.GetEnumerator())
   {
     while (enumerator.MoveNext())
     {
       AvatarEditor.SceneStateCache current = enumerator.Current;
       if (!((UnityEngine.Object) current.view == (UnityEngine.Object) null))
       {
         current.view.m_SceneViewState.showFog = current.state.showFog;
         current.view.m_SceneViewState.showFlares = current.state.showFlares;
         current.view.m_SceneViewState.showMaterialUpdate = current.state.showMaterialUpdate;
         current.view.m_SceneViewState.showSkybox = current.state.showSkybox;
       }
     }
   }
   this.m_EditMode = AvatarEditor.EditMode.Stopping;
   this.DestroyEditor();
   this.ChangeInspectorLock(this.m_InspectorLocked);
   if (!EditorApplication.isUpdating && !Unsupported.IsDestroyScriptableObject((ScriptableObject) this))
   {
     if (SceneManager.GetActiveScene().path.Length <= 0)
     {
       if (this.sceneSetup != null && this.sceneSetup.Length > 0)
       {
         EditorSceneManager.RestoreSceneManagerSetup(this.sceneSetup);
         this.sceneSetup = (SceneSetup[]) null;
       }
       else
         EditorSceneManager.NewScene(NewSceneSetup.DefaultGameObjects);
     }
   }
   else if (Unsupported.IsDestroyScriptableObject((ScriptableObject) this))
   {
     // ISSUE: object of a compiler-generated type is created
     // ISSUE: variable of a compiler-generated type
     AvatarEditor.\u003CSwitchToAssetMode\u003Ec__AnonStorey9C modeCAnonStorey9C = new AvatarEditor.\u003CSwitchToAssetMode\u003Ec__AnonStorey9C();
     // ISSUE: reference to a compiler-generated field
     modeCAnonStorey9C.\u003C\u003Ef__this = this;
     // ISSUE: reference to a compiler-generated field
     modeCAnonStorey9C.CleanUpSceneOnDestroy = (EditorApplication.CallbackFunction) null;
     // ISSUE: reference to a compiler-generated field
     // ISSUE: reference to a compiler-generated method
     modeCAnonStorey9C.CleanUpSceneOnDestroy = new EditorApplication.CallbackFunction(modeCAnonStorey9C.\u003C\u003Em__1C9);
     // ISSUE: reference to a compiler-generated field
     EditorApplication.update += modeCAnonStorey9C.CleanUpSceneOnDestroy;
   }
   this.m_GameObject = (GameObject) null;
   this.m_ModelBones = (Dictionary<Transform, bool>) null;
   this.SelectAsset();
   if (this.m_CameFromImportSettings)
     return;
   this.m_EditMode = AvatarEditor.EditMode.NotEditing;
 }