Exemplo n.º 1
0
        void OnEnable()
        {
            //set up other class instances
            userSettings = IFXToolsUserSettings.GetUserSettings();
            userSettings.LoadUserSettings();
            thumbnailToolInstance = new IFXThumbnailTool();
            bundleTools           = (IFXBundleTools )ScriptableObject.CreateInstance(typeof(IFXBundleTools));
            bundleTools.Init(userSettings);

            //other
            bundlesBuilding = false;

            //Set defualt checkmarks
            buildQACheckOverride = false;
            windowsBuildYesNo    = true;
            androidBuildYesNo    = true;
            iOSBuildYesNo        = true;
            altCenterMethod      = false;
            hardResetCache       = false;

            //disable auto git for non content team mode
            if (userSettings.CTMode())
            {
                autoGitYesNo = true;
            }
            else
            {
                autoGitYesNo = false;
            }
        }
        void OnEnable()
        {
            thumbnailToolInstance = new IFXThumbnailTool();
            thumbnailToolInstance.ThumbnailSetup(thumbnailToolInstance.ifxObject);
            userSettings = IFXToolsUserSettings.GetUserSettings();
            userSettings.LoadUserSettings();


            if (thumbnailPreview == null)
            {
                thumbnailPreview = new IFXThumbnailToolThumbnailPreviewWindow(thumbnailToolInstance);
                //thumbnailPreview = GetWindow<IFXThumbnailToolThumbnailPreviewWindow>();
            }
            thumbnailPreview.position.Set(0, 0, thumbnailToolInstance.imageResolutionWidth, thumbnailToolInstance.imageResolutionHeight);

            //editorWindow.End();
            thumbnailPreview.Show();
        }
        public void LoadUserSettings()
        {
            if (File.Exists(settingsFilePath))
            {
                var textFile = File.ReadAllText(settingsFilePath);
                IFXToolsUserSettings result = JsonUtility.FromJson <IFXToolsUserSettings>(textFile);
                if (result != null)
                {
                    cdnProjectPath = result.cdnProjectPath;

                    cdnWinIFXLoc     = result.cdnWinIFXLoc;
                    cdnAndroidIFXLoc = result.cdnAndroidIFXLoc;
                    cdniOSIFXLoc     = result.cdniOSIFXLoc;

                    cdnWinSceneLoc     = result.cdnWinSceneLoc;
                    cdnAndroidSceneLoc = result.cdnAndroidSceneLoc;
                    cdniOSSceneLoc     = result.cdniOSSceneLoc;

                    projectWinLoc     = result.projectWinLoc;
                    projectAndroidLoc = result.projectAndroidLoc;
                    projectiOSLoc     = result.projectiOSLoc;

                    unityEXELoc = result.unityEXELoc;

                    prefabPrefix = result.prefabPrefix;
                    prefabAfix   = result.prefabAfix;

                    thumbnailSavePath = result.thumbnailSavePath;

                    //debugMode = result.debugMode;

                    cTCode = result.cTCode;
                }
                else
                {
                    Debug.Log("No settings found at : " + settingsFilePath);
                }
            }
            else
            {
                SettingsAutoSetup();
                SaveUserSettings();
            }
        }
 public void Init(IFXToolsUserSettings userSettingsIN)
 {
     userSettings = userSettingsIN;
 }