コード例 #1
0
        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();
        }
コード例 #2
0
 private void OnDisable()
 {
     NativePluginSettings.Save();
 }