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(); }
internal void SaveChanges() { LerpedCore.SetString(buildPath, bPath); LerpedCore.SetString(editorPath, ePath); me.Close(); }