示例#1
0
            static LerpedStartCheck()
            {
                if (!LerpedCore.GetBool(LerpedCore.UnityBoot))
                {
                    LerpedCore.SetBool(LerpedCore.UnityBoot, true);
                    string bPath = Path.GetDirectoryName(LerpedCore.GetString(LerpedEditorCore.buildPath));
                    if (string.IsNullOrEmpty(bPath))
                    {
                        bPath = "";
                        return;
                    }
                    else if (!Directory.Exists(bPath))
                    {
                        Debug.LogErrorFormat("Your fork from Lerp2API has been moved, re-edit the path under: 'Lerp2Dev Team Tools > Refresh Project API References > Change Path > Build Dependencies Path', click '...' and set the new path, pressing 'Save'.\n'{0}' directory path doesn't exists!", bPath);
                        return;
                    }

                    long estimatedModTime = LerpedCore.GetLong(LerpedEditorCore.lastBuildTime),
                         lastModTime      = Helpers.LatestModification(bPath);

                    if (estimatedModTime != lastModTime)
                    {
                        LerpedPaths lp = GetWindow <LerpedPaths>();
                        lp.iInit(lp, LerpedAPIChange.InEnter);
                    }
                }
            }
示例#2
0
        public void iInit(LerpedPaths rf, LerpedAPIChange change = LerpedAPIChange.Default)
        {
            if (rf != null)
            {
                rf.Close();
            }

            bool rt = false;

            if (LerpedEditorCore.availablePaths)
            {
                if (LerpedEditorCore.buildPath.Contains(Application.dataPath))
                {
                    EditorUtility.DisplayDialog("API Message", "You have reversed the path, you should put in Project API the path from this Project,\nand in Build Path, the path where the DLL are builded!", "Ok");
                }
                else
                {
                    int r = EditorUtility.DisplayDialogComplex("API Message", GetCaption(change), "Yes", "No", "Change path");
                    switch (r)
                    {
                    case 0:
                        LerpedEditorCore.UpdateDependencies();
                        rt = true;
                        return;

                    case 1:
                        rt = true;
                        return;

                    case 2:
                        break;
                    }
                }
            }

            if (rt)
            {
                return;
            }

            if (me == null)
            {
                if (rf == null)
                {
                    me = GetWindow <LerpedPaths>();
                }
                else
                {
                    me = rf;
                }
            }

            bPath = LerpedCore.GetString(buildPath);
            ePath = LerpedCore.GetString(editorPath); //Is null?

            bPath = string.IsNullOrEmpty(bPath) ? Application.dataPath : bPath;
            ePath = string.IsNullOrEmpty(ePath) ? Application.dataPath : ePath;

            me.position = new Rect(Screen.resolutions[0].width / 2 - 200, Screen.resolutions[0].height / 2 - 150, 400, 300);
            me.Show();
        }
示例#3
0
 static void Init()
 {
     me = GetWindow <LerpedPaths>();
     me.iInit(me);
 }