private void OnEnable()
        {
            PluginsFoldoutAnimator = new AnimBool(true);
            PluginsFoldoutAnimator.valueChanged.AddListener(Repaint);

            NewPluginFoldoutAnimator = new AnimBool(false);
            NewPluginFoldoutAnimator.valueChanged.AddListener(Repaint);

            NativePluginSettings.Load();
            for (int i = 0; i < NativePluginSettings.plugins.Count; i++)
            {
                NativePluginSettings.plugins[i].sectionAnimator.valueChanged.RemoveAllListeners();
                NativePluginSettings.plugins[i].sectionAnimator.valueChanged.AddListener(Repaint);
                foreach (var options in NativePluginSettings.plugins[i].buildOptions)
                {
                    options.foldoutAnimator.valueChanged.RemoveAllListeners();
                    options.foldoutAnimator.valueChanged.AddListener(Repaint);
                }
            }
            if (newPlugin == null)
            {
                newPlugin = NativePlugin.GetDefault(this);
            }

            CMakeHelper.GetCMakeVersion((version) =>
            {
                cmakeVersion = version;
            });

            backgroundProcessManager = new BackgroundProcessManager(this);

            List <string> platformStrings = new List <string>();
            List <int>    platforms       = new List <int>();

            foreach (BuildPlatform platform in Enum.GetValues(typeof(BuildPlatform)))
            {
                if (GetBuilder(platform).IsAvailable)
                {
                    platforms.Add((int)platform);
                    platformStrings.Add(ObjectNames.NicifyVariableName(Enum.GetName(typeof(BuildPlatform), platform)));
                }
            }
            AvailablePlatformStrings = platformStrings.ToArray();
            AvailablePlatformInts    = platforms.ToArray();
        }
Beispiel #2
0
        public void Start()
        {
            try {
                Process.Start();

                Process.BeginOutputReadLine();
                Process.BeginErrorReadLine();

                BackgroundProcessManager.Add(this);
            } catch (Exception ex) {
                string err = string.Format("Could not start process: {0}", ex.ToString());
                ErrorData.AppendLine(err);
                Action <string> ErrorLineHandler = ErrorLine;
                if (ErrorLineHandler != null)
                {
                    EditorMainThread.Run(() => {
                        ErrorLineHandler(err);
                    });
                }
            }
        }
Beispiel #3
0
 public BackgroundProcessManager(EditorWindow editorWindow)
 {
     this.editorWindow = editorWindow;
     Get = this;
 }