Beispiel #1
0
        private void ShowPlatformSettings()
        {
            BuildPlatform[] validPlatforms = GetBuildPlayerValidPlatforms();
            if (validPlatforms.Length > 0)
            {
                GUILayout.Label("Platform settings", EditorStyles.boldLabel);
                int platformIndex = EditorGUILayout.BeginPlatformGrouping(validPlatforms, null);

                if (validPlatforms[platformIndex].name == BuildPipeline.GetEditorTargetName())
                {
                    ShowEditorSettings();
                }
                else
                {
                    BuildTargetGroup targetGroup = validPlatforms[platformIndex].targetGroup;
                    if (targetGroup == BuildTargetGroup.Standalone)
                    {
                        desktopExtension.OnPlatformSettingsGUI(this);
                    }
                    else
                    {
                        IPluginImporterExtension extension = ModuleManager.GetPluginImporterExtension(targetGroup);
                        if (extension != null)
                        {
                            extension.OnPlatformSettingsGUI(this);
                        }
                    }
                }
                EditorGUILayout.EndPlatformGrouping();
            }
        }
Beispiel #2
0
        private void ShowPlatformSettings()
        {
            BuildPlayerWindow.BuildPlatform[] playerValidPlatforms = this.GetBuildPlayerValidPlatforms();
            if (playerValidPlatforms.Length <= 0)
            {
                return;
            }
            GUILayout.Label("Platform settings", EditorStyles.boldLabel, new GUILayoutOption[0]);
            int index = EditorGUILayout.BeginPlatformGrouping(playerValidPlatforms, (GUIContent)null);

            if (playerValidPlatforms[index].name == BuildPipeline.GetEditorTargetName())
            {
                this.ShowEditorSettings();
            }
            else
            {
                BuildTargetGroup targetGroup = playerValidPlatforms[index].targetGroup;
                if (targetGroup == BuildTargetGroup.Standalone)
                {
                    this.m_DesktopExtension.OnPlatformSettingsGUI(this);
                }
                else
                {
                    IPluginImporterExtension importerExtension = ModuleManager.GetPluginImporterExtension(targetGroup);
                    if (importerExtension != null)
                    {
                        importerExtension.OnPlatformSettingsGUI(this);
                    }
                }
            }
            EditorGUILayout.EndPlatformGrouping();
        }
Beispiel #3
0
 private void ShowPlatformSettings()
 {
     BuildPlayerWindow.BuildPlatform[] buildPlayerValidPlatforms = this.GetBuildPlayerValidPlatforms();
     if (buildPlayerValidPlatforms.Length > 0)
     {
         GUILayout.Label("Platform settings", EditorStyles.boldLabel, new GUILayoutOption[0]);
         int num = EditorGUILayout.BeginPlatformGrouping(buildPlayerValidPlatforms, null);
         if (buildPlayerValidPlatforms[num].name == BuildPipeline.GetEditorTargetName())
         {
             this.ShowEditorSettings();
         }
         else
         {
             BuildTargetGroup targetGroup = buildPlayerValidPlatforms[num].targetGroup;
             if (targetGroup == BuildTargetGroup.Standalone)
             {
                 this.desktopExtension.OnPlatformSettingsGUI(this);
             }
             else
             {
                 IPluginImporterExtension pluginImporterExtension = ModuleManager.GetPluginImporterExtension(targetGroup);
                 if (pluginImporterExtension != null)
                 {
                     pluginImporterExtension.OnPlatformSettingsGUI(this);
                 }
             }
         }
         EditorGUILayout.EndPlatformGrouping();
     }
 }
Beispiel #4
0
 public override void OnInspectorGUI()
 {
     EditorGUI.BeginDisabledGroup(false);
     BuildPlayerWindow.BuildPlatform[] buildPlayerValidPlatforms = this.GetBuildPlayerValidPlatforms();
     GUILayout.Label("Select platforms for plugin", EditorStyles.boldLabel, new GUILayoutOption[0]);
     EditorGUILayout.BeginVertical(GUI.skin.box, new GUILayoutOption[0]);
     this.ShowGeneralOptions();
     EditorGUILayout.EndVertical();
     EditorGUI.BeginChangeCheck();
     if (EditorGUI.EndChangeCheck())
     {
         this.hasModified = true;
     }
     GUILayout.Space(10f);
     if (buildPlayerValidPlatforms.Length > 0)
     {
         GUILayout.Label("Platform settings", EditorStyles.boldLabel, new GUILayoutOption[0]);
         int num = EditorGUILayout.BeginPlatformGrouping(buildPlayerValidPlatforms, null);
         if (buildPlayerValidPlatforms[num].name == BuildPipeline.GetEditorTargetName())
         {
             this.ShowEditorSettings();
         }
         else
         {
             BuildTargetGroup targetGroup = buildPlayerValidPlatforms[num].targetGroup;
             if (targetGroup == BuildTargetGroup.Standalone)
             {
                 this.desktopExtension.OnPlatformSettingsGUI(this);
             }
             else
             {
                 IPluginImporterExtension pluginImporterExtension = ModuleManager.GetPluginImporterExtension(targetGroup);
                 if (pluginImporterExtension != null)
                 {
                     pluginImporterExtension.OnPlatformSettingsGUI(this);
                 }
             }
         }
         EditorGUILayout.EndPlatformGrouping();
     }
     EditorGUI.EndDisabledGroup();
     base.ApplyRevertGUI();
     GUILayout.Label("Information", EditorStyles.boldLabel, new GUILayoutOption[0]);
     this.informationScrollPosition = EditorGUILayout.BeginVerticalScrollView(this.informationScrollPosition, new GUILayoutOption[0]);
     foreach (KeyValuePair <string, string> current in this.pluginInformation)
     {
         GUILayout.BeginHorizontal(new GUILayoutOption[0]);
         GUILayout.Label(current.Key, new GUILayoutOption[]
         {
             GUILayout.Width(50f)
         });
         GUILayout.TextField(current.Value, new GUILayoutOption[0]);
         GUILayout.EndHorizontal();
     }
     EditorGUILayout.EndScrollView();
     GUILayout.FlexibleSpace();
     if (this.importer.isNativePlugin)
     {
         EditorGUILayout.HelpBox("Once a native plugin is loaded from script, it's never unloaded. If you deselect a native plugin and it's already loaded, please restart Unity.", MessageType.Warning);
     }
 }