public static AndroidAgentEditor ShowAgentDependencyEditorWindow() { AndroidAgentEditor editor = EditorWindow.GetWindow(typeof(AndroidAgentEditor), true, "Android Plugins Editor") as AndroidAgentEditor; editor.initialize(); editor.Show(); return(editor); }
void initialize() { manifest = new Manifest(); plugins = new AgentDependency(); if (System.IO.File.Exists(AgentDependency.AgentsFile)) { plugins = AndroidAgentEditor.LoadAgentsFromFile(AgentDependency.AgentsFile); if (System.IO.File.Exists(Manifest.ManifestFile)) { manifest = AndroidManifestEditor.LoadManifestFromFile(Manifest.ManifestFile); } else { manifest = new Manifest(); } if (System.IO.File.Exists(ManifestResource.StringsFilename)) { exist_strings = StringEditor.LoadResourcesFromFile(ManifestResource.StringsFilename); } else { exist_strings = new ManifestResource(); } strings = new ManifestResource(); } else { Debug.LogError("AgentDependencies.xml not found."); } PositiveButton.fixedWidth = 30; PositiveButton.stretchWidth = false; NegetiveButton.fixedWidth = 30; NegetiveButton.stretchWidth = false; BoldLabel.normal.textColor = Color.white; BoldLabel.fontStyle = FontStyle.Bold; SubBoldLabel.fontStyle = FontStyle.Bold; RedLabel.normal.textColor = new Color(0.8f, 0.1f, 0.1f, 1.0f); GreenLabel.normal.textColor = new Color(0.1f, 0.8f, 0.1f, 1.0f); YellowLabel.normal.textColor = new Color(0.8f, 0.8f, 0.1f, 1.0f); if (System.IO.Directory.Exists(AgentVersion.VersionsPath)) { Versions = GetVersionsFromPath(AgentVersion.VersionsPath, plugins); } else { Versions = new List <AgentSetVersion>(); } guiVersions = new UnityGUI_Versions(Versions, plugins, manifest); guiProperties = new UnityGUI_AgentVersion(manifest); guiVersions.SetStyles(PositiveButton, NegetiveButton, BoldLabel, GreenLabel, RedLabel, YellowLabel); guiProperties.SetStyles(PositiveButton, NegetiveButton, SubBoldLabel, GreenLabel, RedLabel, YellowLabel); }