public override void OnDisable()
 {
     if (this.m_State != null && this.m_State.modified)
     {
         AssetImporter assetImporter = base.target as AssetImporter;
         string        message       = "Unapplied import settings for '" + assetImporter.assetPath + "'";
         if (base.targets.Length > 1)
         {
             message = "Unapplied import settings for '" + base.targets.Length + "' files";
         }
         if (EditorUtility.DisplayDialog("Unapplied import settings", message, "Apply", "Revert"))
         {
             AssemblyDefinitionImporterInspector.SaveAndUpdateAssemblyDefinitionStates(this.m_State, this.m_TargetStates);
         }
     }
 }
 public override void OnInspectorGUI()
 {
     if (this.m_State == null)
     {
         try
         {
             this.LoadAssemblyDefinitionFiles();
         }
         catch (Exception e)
         {
             this.m_State = null;
             this.ShowLoadErrorExceptionGUI(e);
             return;
         }
     }
     AssemblyDefinitionPlatform[]       assemblyDefinitionPlatforms = CompilationPipeline.GetAssemblyDefinitionPlatforms();
     CustomScriptOptinalUnityAssembly[] optinalUnityAssemblies      = CustomScriptAssembly.OptinalUnityAssemblies;
     using (new EditorGUI.DisabledScope(false))
     {
         EditorGUI.BeginChangeCheck();
         if (base.targets.Length > 1)
         {
             using (new EditorGUI.DisabledScope(true))
             {
                 string text = string.Join(", ", (from t in this.m_TargetStates
                                                  select t.name).ToArray <string>());
                 EditorGUILayout.TextField(AssemblyDefinitionImporterInspector.Styles.name, text, EditorStyles.textField, new GUILayoutOption[0]);
             }
         }
         else
         {
             this.m_State.name = EditorGUILayout.TextField(AssemblyDefinitionImporterInspector.Styles.name, this.m_State.name, EditorStyles.textField, new GUILayoutOption[0]);
         }
         GUILayout.Label(AssemblyDefinitionImporterInspector.Styles.references, EditorStyles.boldLabel, new GUILayoutOption[0]);
         this.m_ReferencesList.DoLayoutList();
         GUILayout.Label(AssemblyDefinitionImporterInspector.Styles.unityReferences, EditorStyles.boldLabel, new GUILayoutOption[0]);
         EditorGUILayout.BeginVertical(GUI.skin.box, new GUILayoutOption[0]);
         for (int i = 0; i < optinalUnityAssemblies.Length; i++)
         {
             this.m_State.optionalUnityReferences[i] = AssemblyDefinitionImporterInspector.ToggleWithMixedValue(new GUIContent(optinalUnityAssemblies[i].DisplayName), this.m_State.optionalUnityReferences[i]);
             if (this.m_State.optionalUnityReferences[i] == AssemblyDefinitionImporterInspector.MixedBool.True)
             {
                 EditorGUILayout.HelpBox(optinalUnityAssemblies[i].AdditinalInformationWhenEnabled, MessageType.Info);
             }
         }
         EditorGUILayout.EndVertical();
         GUILayout.Space(10f);
         GUILayout.Label(AssemblyDefinitionImporterInspector.Styles.platforms, EditorStyles.boldLabel, new GUILayoutOption[0]);
         EditorGUILayout.BeginVertical(GUI.skin.box, new GUILayoutOption[0]);
         AssemblyDefinitionImporterInspector.MixedBool compatibleWithAnyPlatform = this.m_State.compatibleWithAnyPlatform;
         this.m_State.compatibleWithAnyPlatform = AssemblyDefinitionImporterInspector.ToggleWithMixedValue(AssemblyDefinitionImporterInspector.Styles.anyPlatform, this.m_State.compatibleWithAnyPlatform);
         if (compatibleWithAnyPlatform == AssemblyDefinitionImporterInspector.MixedBool.Mixed && this.m_State.compatibleWithAnyPlatform != AssemblyDefinitionImporterInspector.MixedBool.Mixed)
         {
             AssemblyDefinitionImporterInspector.UpdatePlatformCompatibility(this.m_State.compatibleWithAnyPlatform, this.m_TargetStates);
             this.UpdateCombinedCompatibility();
         }
         else if (this.m_State.compatibleWithAnyPlatform != compatibleWithAnyPlatform)
         {
             AssemblyDefinitionImporterInspector.InversePlatformCompatibility(this.m_State);
         }
         if (this.m_State.compatibleWithAnyPlatform != AssemblyDefinitionImporterInspector.MixedBool.Mixed)
         {
             GUILayout.Label((this.m_State.compatibleWithAnyPlatform != AssemblyDefinitionImporterInspector.MixedBool.True) ? AssemblyDefinitionImporterInspector.Styles.includePlatforms : AssemblyDefinitionImporterInspector.Styles.excludePlatforms, EditorStyles.boldLabel, new GUILayoutOption[0]);
             for (int j = 0; j < assemblyDefinitionPlatforms.Length; j++)
             {
                 this.m_State.platformCompatibility[j] = AssemblyDefinitionImporterInspector.ToggleWithMixedValue(new GUIContent(assemblyDefinitionPlatforms[j].DisplayName), this.m_State.platformCompatibility[j]);
             }
             EditorGUILayout.Space();
             GUILayout.BeginHorizontal(new GUILayoutOption[0]);
             if (GUILayout.Button(AssemblyDefinitionImporterInspector.Styles.selectAll, new GUILayoutOption[0]))
             {
                 AssemblyDefinitionImporterInspector.SetPlatformCompatibility(this.m_State, AssemblyDefinitionImporterInspector.MixedBool.True);
             }
             if (GUILayout.Button(AssemblyDefinitionImporterInspector.Styles.deselectAll, new GUILayoutOption[0]))
             {
                 AssemblyDefinitionImporterInspector.SetPlatformCompatibility(this.m_State, AssemblyDefinitionImporterInspector.MixedBool.False);
             }
             GUILayout.FlexibleSpace();
             GUILayout.EndHorizontal();
         }
         EditorGUILayout.EndVertical();
         GUILayout.Space(10f);
         if (EditorGUI.EndChangeCheck())
         {
             this.m_State.modified = true;
         }
     }
     EditorGUILayout.Space();
     GUILayout.BeginHorizontal(new GUILayoutOption[0]);
     GUILayout.FlexibleSpace();
     using (new EditorGUI.DisabledScope(!this.m_State.modified))
     {
         if (GUILayout.Button(AssemblyDefinitionImporterInspector.Styles.revert, new GUILayoutOption[0]))
         {
             this.LoadAssemblyDefinitionFiles();
         }
         if (GUILayout.Button(AssemblyDefinitionImporterInspector.Styles.apply, new GUILayoutOption[0]))
         {
             AssemblyDefinitionImporterInspector.SaveAndUpdateAssemblyDefinitionStates(this.m_State, this.m_TargetStates);
         }
     }
     GUILayout.EndHorizontal();
 }