예제 #1
0
 private void Connect(bool forceReconnect = false)
 {
     if ((UnityEngine.Object) this._src != (UnityEngine.Object)null && !forceReconnect)
     {
         return;
     }
     this._src = DOTweenUtilityWindow.ConnectToSource(this._src, true, true);
 }
        // Also called via Reflection by Autorun
        public static void ApplyModulesSettings()
        {
            DOTweenSettings src = DOTweenUtilityWindow.GetDOTweenSettings();

            if (src != null)
            {
                Refresh(src, true);
            }
        }
예제 #3
0
        // If force is FALSE opens the window only if DOTween's version has changed
        // (set to FALSE by OnPostprocessAllAssets).<para/>
        // NOTE: this is also called via Reflection by UpgradeWindow
        public static void Open()
        {
            DOTweenUtilityWindow window = EditorWindow.GetWindow <DOTweenUtilityWindow>(true, _Title, true);

            window.minSize = _WinSize;
            window.maxSize = _WinSize;
            window.ShowUtility();
            EditorPrefs.SetString(Id, DOTween.Version);
            EditorPrefs.SetString(IdPro, EditorUtils.proVersion);
        }
예제 #4
0
        public static void Open()
        {
            DOTweenUtilityWindow window = EditorWindow.GetWindow <DOTweenUtilityWindow>(true, "DOTween Utility Panel", true);

            window.minSize = DOTweenUtilityWindow._WinSize;
            window.maxSize = DOTweenUtilityWindow._WinSize;
            window.ShowUtility();
            EditorPrefs.SetString("DOTweenVersion", DOTween.Version);
            EditorPrefs.SetString("DOTweenProVersion", EditorUtils.proVersion);
        }
예제 #5
0
        public static void ApplyModulesSettings()
        {
            DOTweenSettings doTweenSettings = DOTweenUtilityWindow.GetDOTweenSettings();

            if (!((Object)doTweenSettings != (Object)null))
            {
                return;
            }
            DOTweenUtilityWindowModules.Refresh(doTweenSettings, true);
        }
        void ConnectToSource(bool forceReconnection = false)
        {
            _headerImg = AssetDatabase.LoadAssetAtPath("Assets/" + EditorUtils.editorADBDir + "Imgs/DOTweenIcon.png", typeof(Texture2D)) as Texture2D;

            if (_settings == null || forceReconnection)
            {
                _settings = _isRuntime
                    ? Resources.Load(DOTweenSettings.AssetName) as DOTweenSettings
                    : DOTweenUtilityWindow.GetDOTweenSettings();
            }
        }
예제 #7
0
 private static void ShowWindow()
 {
     DOTweenUtilityWindow.Open();
 }
예제 #8
0
        private static DOTweenSettings ConnectToSource(DOTweenSettings src, bool createIfMissing, bool fullSetup)
        {
            DOTweenUtilityWindow.LocationData to1 = new DOTweenUtilityWindow.LocationData(EditorUtils.assetsPath + EditorUtils.pathSlash + "Resources");
            DOTweenUtilityWindow.LocationData to2 = new DOTweenUtilityWindow.LocationData(EditorUtils.dotweenDir + "Resources");
            bool flag = EditorUtils.demigiantDir != null;

            DOTweenUtilityWindow.LocationData to3 = flag ? new DOTweenUtilityWindow.LocationData(EditorUtils.demigiantDir + "Resources") : new DOTweenUtilityWindow.LocationData();
            if ((UnityEngine.Object)src == (UnityEngine.Object)null)
            {
                src = EditorUtils.ConnectToSourceAsset <DOTweenSettings>(to1.adbFilePath, false);
                if ((UnityEngine.Object)src == (UnityEngine.Object)null)
                {
                    src = EditorUtils.ConnectToSourceAsset <DOTweenSettings>(to2.adbFilePath, false);
                }
                if ((UnityEngine.Object)src == (UnityEngine.Object)null & flag)
                {
                    src = EditorUtils.ConnectToSourceAsset <DOTweenSettings>(to3.adbFilePath, false);
                }
            }
            if ((UnityEngine.Object)src == (UnityEngine.Object)null)
            {
                if (!createIfMissing)
                {
                    return((DOTweenSettings)null);
                }
                if (!Directory.Exists(to1.dir))
                {
                    AssetDatabase.CreateFolder(to1.adbParentDir, "Resources");
                }
                src = EditorUtils.ConnectToSourceAsset <DOTweenSettings>(to1.adbFilePath, true);
            }
            if (fullSetup)
            {
                switch (src.storeSettingsLocation)
                {
                case DOTweenSettings.SettingsLocation.AssetsDirectory:
                    src = DOTweenUtilityWindow.MoveSrc(new DOTweenUtilityWindow.LocationData[2]
                    {
                        to2,
                        to3
                    }, to1);
                    break;

                case DOTweenSettings.SettingsLocation.DOTweenDirectory:
                    src = DOTweenUtilityWindow.MoveSrc(new DOTweenUtilityWindow.LocationData[2]
                    {
                        to1,
                        to3
                    }, to2);
                    break;

                case DOTweenSettings.SettingsLocation.DemigiantDirectory:
                    src = DOTweenUtilityWindow.MoveSrc(new DOTweenUtilityWindow.LocationData[2]
                    {
                        to1,
                        to2
                    }, to3);
                    break;
                }
            }
            return(src);
        }
예제 #9
0
 public static DOTweenSettings GetDOTweenSettings()
 {
     return(DOTweenUtilityWindow.ConnectToSource((DOTweenSettings)null, false, false));
 }