private static void PhotonSetupWizard(string name, string tooltip, Texture image = null) { if (Button(name, tooltip, image)) { PlayMakerEditorStartup.GetType("PlayMakerPhotonWizard").GetMethod("Init").Invoke(null, null); } }
private static void GetPlayMakerVersion() { var versionInfo = PlayMakerEditorStartup.GetType("HutongGames.PlayMakerEditor.VersionInfo"); if (versionInfo != null) { currentVersion = versionInfo.GetMethod("GetAssemblyInformationalVersion").Invoke(null, null) as string; if (currentVersion != null) { currentVersionShort = currentVersion.Substring(0, currentVersion.LastIndexOf('.')); currentVersionLabel = "version " + currentVersionShort; majorVersion = int.Parse(currentVersionShort.Substring(0, 3).Replace(".", "")); } else { currentVersionLabel = "version unknown"; currentVersionShort = ""; majorVersion = -1; } } else { currentVersionLabel = "Not installed"; currentVersionShort = ""; majorVersion = -1; } }
public static void Init() { // Is PlayMakerPhotonWizard available? setupPhoton = PlayMakerEditorStartup.GetType("PlayMakerPhotonWizard") != null; photonIcon = (Texture)Resources.Load("photonIcon"); addonsScroll.y = EditorPrefs.GetFloat("PlayMaker.AddonManagerScroll", 0); }
public void OnEnable() { #if UNITY_PRE_5_1 title = "Welcome To PlayMaker"; #else titleContent = new GUIContent("Welcome To PlayMaker"); #endif maxSize = new Vector2(windowWidth, windowHeight); minSize = maxSize; // Try to get current playmaker version if installed GetPlayMakerVersion(); // Is this the install for the student version? isStudentVersion = AssetGUIDs.IsStudentVersionInstall(); // Is PlayMakerPhotonWizard available? setupPhoton = PlayMakerEditorStartup.GetType("PlayMakerPhotonWizard") != null; // Setup pages currentPageRect = new Rect(0, pageTop, windowWidth, windowHeight - pagePadding); nextPageRect = new Rect(0, pageTop, windowWidth, windowHeight - pagePadding); headerRect = new Rect(0, 0, windowWidth, 60); backButtonRect = new Rect(0, windowHeight - 24, 123, 24); // Save page to survive recompile...? //currentPage = (Page)EditorPrefs.GetInt(editorPrefsPage, (int)Page.Welcome); currentPage = Page.Welcome; // We want to show the Upgrade Guide after installing /* * if (EditorStartupPrefs.ShowUpgradeGuide) * { * //currentPage = Page.UpgradeGuide; //TODO: This was problematic * EditorStartupPrefs.ShowUpgradeGuide = false; // reset * EditorUtility.DisplayDialog("PlayMaker", * "Please check the Upgrade Guide for more information on this release.", * "OK"); * }*/ SetPage(currentPage); Update(); }
public void OnEnable() { #if UNITY_PRE_5_1 title = "Welcome To PlayMaker"; #else titleContent = new GUIContent("Welcome To PlayMaker"); #endif maxSize = new Vector2(windowWidth, windowHeight); minSize = maxSize; // Try to get current playmaker version if installed GetPlayMakerVersion(); // Is PlayMakerPhotonWizard available? setupPhoton = PlayMakerEditorStartup.GetType("PlayMakerPhotonWizard") != null; // Setup pages currentPageRect = new Rect(0, pageTop, windowWidth, windowHeight - pagePadding); nextPageRect = new Rect(0, pageTop, windowWidth, windowHeight - pagePadding); headerRect = new Rect(0, 0, windowWidth, 60); backButtonRect = new Rect(0, windowHeight - 24, 123, 24); // Save page to survive recompile...? //currentPage = (Page)EditorPrefs.GetInt(editorPrefsPage, (int)Page.Welcome); currentPage = Page.Welcome; // We want to show the Upgrade Guide after installing // However, installation forces a recompile so we save an EditorPref var showUpgradeGuide = EditorPrefs.GetBool(editorPrefsShowUpgradeGuide, false); if (showUpgradeGuide) { //currentPage = Page.UpgradeGuide; //TODO: This was problematic, need a better solution EditorPrefs.SetBool(editorPrefsShowUpgradeGuide, false); // reset EditorUtility.DisplayDialog("PlayMaker", "Please check the Upgrade Guide for more information on this release.", "OK"); } SetPage(currentPage); Update(); }
public static Type FindTypeInLoadedAssemblies(string typeName) { return(PlayMakerEditorStartup.FindTypeInLoadedAssemblies(typeName)); }
public static Type GetType(string typeName) { return(PlayMakerEditorStartup.GetType(typeName)); }
private static void LaunchPhotonSetupWizard(object userData) { PlayMakerEditorStartup.GetType("PlayMakerPhotonWizard").GetMethod("Init").Invoke(null, null); }
private static bool TextMeshProIsPresent() { return(PlayMakerEditorStartup.GetType("TMPro.TMP_Dropdown") != null); }