GetEditorTargetName() приватный Метод

private GetEditorTargetName ( ) : string
Результат string
        private BuildPlatform[] GetBuildPlayerValidPlatforms()
        {
            List <BuildPlatform> validPlatforms = BuildPlatforms.instance.GetValidPlatforms();
            List <BuildPlatform> filtered       = new List <BuildPlatform>();

            if (m_CompatibleWithEditor > Compatibility.NotCompatible)
            {
                BuildPlatform editorPlatform = new BuildPlatform("Editor settings", "Editor Settings", "BuildSettings.Editor", BuildTargetGroup.Unknown, BuildTarget.NoTarget, true);
                editorPlatform.name = BuildPipeline.GetEditorTargetName();
                filtered.Add(editorPlatform);
            }
            foreach (BuildPlatform bp in validPlatforms)
            {
                if (IgnorePlatform(bp.defaultTarget))
                {
                    continue;
                }

                if (bp.targetGroup == BuildTargetGroup.Standalone)
                {
                    if (compatibleWithStandalone < Compatibility.Compatible)
                    {
                        continue;
                    }
                }
                else
                {
                    if (m_CompatibleWithPlatform[(int)bp.defaultTarget] < Compatibility.Compatible)
                    {
                        continue;
                    }

                    IPluginImporterExtension extension = ModuleManager.GetPluginImporterExtension(bp.targetGroup);
                    if (extension == null)
                    {
                        continue;
                    }
                }

                filtered.Add(bp);
            }

            return(filtered.ToArray());
        }
Пример #2
0
        private BuildPlayerWindow.BuildPlatform[] GetBuildPlayerValidPlatforms()
        {
            List <BuildPlayerWindow.BuildPlatform> validPlatforms = BuildPlayerWindow.GetValidPlatforms();
            List <BuildPlayerWindow.BuildPlatform> list           = new List <BuildPlayerWindow.BuildPlatform>();

            if (this.m_CompatibleWithEditor > PluginImporterInspector.Compatibility.NotCompatible)
            {
                list.Add(new BuildPlayerWindow.BuildPlatform("Editor settings", "Editor Settings", "BuildSettings.Editor", BuildTargetGroup.Unknown, true)
                {
                    name = BuildPipeline.GetEditorTargetName()
                });
            }
            foreach (BuildPlayerWindow.BuildPlatform current in validPlatforms)
            {
                if (!PluginImporterInspector.IgnorePlatform(current.DefaultTarget))
                {
                    if (current.targetGroup == BuildTargetGroup.Standalone)
                    {
                        if (this.compatibleWithStandalone < PluginImporterInspector.Compatibility.Compatible)
                        {
                            continue;
                        }
                    }
                    else
                    {
                        if (this.m_CompatibleWithPlatform[(int)current.DefaultTarget] < PluginImporterInspector.Compatibility.Compatible)
                        {
                            continue;
                        }
                        if (ModuleManager.GetPluginImporterExtension(current.targetGroup) == null)
                        {
                            continue;
                        }
                    }
                    list.Add(current);
                }
            }
            return(list.ToArray());
        }
        private BuildPlayerWindow.BuildPlatform[] GetBuildPlayerValidPlatforms()
        {
            List <BuildPlayerWindow.BuildPlatform> validPlatforms = BuildPlayerWindow.GetValidPlatforms();
            List <BuildPlayerWindow.BuildPlatform> list2          = new List <BuildPlayerWindow.BuildPlatform>();

            if ((this.m_CompatibleWithAnyPlatform > 0) || (this.m_CompatibleWithEditor > 0))
            {
                BuildPlayerWindow.BuildPlatform item = new BuildPlayerWindow.BuildPlatform("Editor settings", "BuildSettings.Editor", BuildTargetGroup.Unknown, true)
                {
                    name = BuildPipeline.GetEditorTargetName()
                };
                list2.Add(item);
            }
            foreach (BuildPlayerWindow.BuildPlatform platform2 in validPlatforms)
            {
                if (IgnorePlatform(platform2.DefaultTarget))
                {
                    continue;
                }
                if (platform2.targetGroup == BuildTargetGroup.Standalone)
                {
                    if ((this.m_CompatibleWithAnyPlatform >= 1) || (this.compatibleWithStandalone >= 1))
                    {
                        goto Label_00DD;
                    }
                    continue;
                }
                if (((this.m_CompatibleWithAnyPlatform < 1) && (this.m_CompatibleWithPlatform[(int)platform2.DefaultTarget] < 1)) || (ModuleManager.GetPluginImporterExtension(platform2.targetGroup) == null))
                {
                    continue;
                }
Label_00DD:
                list2.Add(platform2);
            }
            return(list2.ToArray());
        }
Пример #4
0
        private BuildPlayerWindow.BuildPlatform[] GetBuildPlayerValidPlatforms()
        {
            List <BuildPlayerWindow.BuildPlatform> validPlatforms    = BuildPlayerWindow.GetValidPlatforms();
            List <BuildPlayerWindow.BuildPlatform> buildPlatformList = new List <BuildPlayerWindow.BuildPlatform>();

            if (this.m_CompatibleWithAnyPlatform > 0 || this.m_CompatibleWithEditor > 0)
            {
                buildPlatformList.Add(new BuildPlayerWindow.BuildPlatform("Editor settings", "BuildSettings.Editor", BuildTargetGroup.Unknown, true)
                {
                    name = BuildPipeline.GetEditorTargetName()
                });
            }
            using (List <BuildPlayerWindow.BuildPlatform> .Enumerator enumerator = validPlatforms.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    BuildPlayerWindow.BuildPlatform current = enumerator.Current;
                    if (!PluginImporterInspector.IgnorePlatform(current.DefaultTarget))
                    {
                        if (current.targetGroup == BuildTargetGroup.Standalone)
                        {
                            if (this.m_CompatibleWithAnyPlatform < 1 && this.compatibleWithStandalone < 1)
                            {
                                continue;
                            }
                        }
                        else if (this.m_CompatibleWithAnyPlatform < 1 && this.m_CompatibleWithPlatform[(int)current.DefaultTarget] < 1 || ModuleManager.GetPluginImporterExtension(current.targetGroup) == null)
                        {
                            continue;
                        }
                        buildPlatformList.Add(current);
                    }
                }
            }
            return(buildPlatformList.ToArray());
        }
Пример #5
0
 private static DefaultPluginImporterExtension.Property[] GetProperties()
 {
     return(new DefaultPluginImporterExtension.Property[2] {
         new DefaultPluginImporterExtension.Property(EditorGUIUtility.TextContent("CPU|Is plugin compatible with 32bit or 64bit Editor?"), "CPU", (object)EditorPluginImporterExtension.EditorPluginCPUArchitecture.AnyCPU, BuildPipeline.GetEditorTargetName()), new DefaultPluginImporterExtension.Property(EditorGUIUtility.TextContent("OS|Is plugin compatible with Windows, OS X or Linux Editor?"), "OS", (object)EditorPluginImporterExtension.EditorPluginOSArchitecture.AnyOS, BuildPipeline.GetEditorTargetName())
     });
 }
 public EditorProperty(GUIContent name, string key, object defaultValue) : base(name, key, defaultValue, BuildPipeline.GetEditorTargetName())
 {
 }
 private static DefaultPluginImporterExtension.Property[] GetProperties()
 {
     return(new DefaultPluginImporterExtension.Property[]
     {
         new DefaultPluginImporterExtension.Property(EditorGUIUtility.TextContent("PluginImporter.EditorCPU"), "CPU", EditorPluginImporterExtension.EditorPluginCPUArchitecture.AnyCPU, BuildPipeline.GetEditorTargetName()),
         new DefaultPluginImporterExtension.Property(EditorGUIUtility.TextContent("PluginImporter.EditorOS"), "OS", EditorPluginImporterExtension.EditorPluginOSArchitecture.AnyOS, BuildPipeline.GetEditorTargetName())
     });
 }
Пример #8
0
 public CPUProperty(GUIContent name, string key, EditorPluginCPUArchitecture defaultValue, Func <Enum, bool> validArch)
     : base(name, key, defaultValue, BuildPipeline.GetEditorTargetName())
 {
     this.validArch = validArch;
 }
Пример #9
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);
     }
 }