static PlayMakerDefines() { DefinesHelper.AddSymbolToAllTargets("PLAYMAKER"); DefinesHelper.AddSymbolToAllTargets("PLAYMAKER_1_9"); DefinesHelper.AddSymbolToAllTargets("PLAYMAKER_1_9_1"); DefinesHelper.AddSymbolToAllTargets("PLAYMAKER_1_8_OR_NEWER"); DefinesHelper.AddSymbolToAllTargets("PLAYMAKER_1_8_5_OR_NEWER"); DefinesHelper.AddSymbolToAllTargets("PLAYMAKER_1_9_OR_NEWER"); DefinesHelper.RemoveSymbolFromAllTargets("PLAYMAKER_1_8"); DefinesHelper.RemoveSymbolFromAllTargets("PLAYMAKER_1_8_0"); DefinesHelper.RemoveSymbolFromAllTargets("PLAYMAKER_1_8_1"); DefinesHelper.RemoveSymbolFromAllTargets("PLAYMAKER_1_8_2"); DefinesHelper.RemoveSymbolFromAllTargets("PLAYMAKER_1_8_3"); DefinesHelper.RemoveSymbolFromAllTargets("PLAYMAKER_1_8_4"); DefinesHelper.RemoveSymbolFromAllTargets("PLAYMAKER_1_8_5"); DefinesHelper.RemoveSymbolFromAllTargets("PLAYMAKER_1_8_6"); DefinesHelper.RemoveSymbolFromAllTargets("PLAYMAKER_1_8_7"); DefinesHelper.RemoveSymbolFromAllTargets("PLAYMAKER_1_8_8"); DefinesHelper.RemoveSymbolFromAllTargets("PLAYMAKER_1_8_9"); DefinesHelper.RemoveSymbolFromAllTargets("PLAYMAKER_1_9_0"); UpdateTextMeshProDefines(); UpdatePipelineDefines(); }
private static void UpdateTextMeshProDefines() { if (TextMeshProIsPresent()) { DefinesHelper.AddSymbol("PLAYMAKER_TMPRO"); } else { DefinesHelper.RemoveSymbol("PLAYMAKER_TMPRO"); } }
private static void UpdatePipelineDefines() { var pipeline = GetPipeline(); if (pipeline == PipelineType.UniversalPipeline) { DefinesHelper.AddSymbol("PLAYMAKER_URP"); } else { DefinesHelper.RemoveSymbol("PLAYMAKER_URP"); } if (pipeline == PipelineType.HDPipeline) { DefinesHelper.AddSymbol("PLAYMAKER_HDRP"); } else { DefinesHelper.RemoveSymbol("PLAYMAKER_HDRP"); } }
static PlayMakerDefines() { DefinesHelper.AddSymbolToAllTargets("PLAYMAKER_STUDENT_VERSION"); DefinesHelper.AddSymbolToAllTargets("PLAYMAKER"); DefinesHelper.AddSymbolToAllTargets("PLAYMAKER_1_9"); DefinesHelper.AddSymbolToAllTargets("PLAYMAKER_1_9_0"); DefinesHelper.AddSymbolToAllTargets("PLAYMAKER_1_8_OR_NEWER"); DefinesHelper.AddSymbolToAllTargets("PLAYMAKER_1_8_5_OR_NEWER"); DefinesHelper.AddSymbolToAllTargets("PLAYMAKER_1_9_OR_NEWER"); DefinesHelper.RemoveSymbolFromAllTargets("PLAYMAKER_1_8"); DefinesHelper.RemoveSymbolFromAllTargets("PLAYMAKER_1_8_0"); DefinesHelper.RemoveSymbolFromAllTargets("PLAYMAKER_1_8_1"); DefinesHelper.RemoveSymbolFromAllTargets("PLAYMAKER_1_8_2"); DefinesHelper.RemoveSymbolFromAllTargets("PLAYMAKER_1_8_3"); DefinesHelper.RemoveSymbolFromAllTargets("PLAYMAKER_1_8_4"); DefinesHelper.RemoveSymbolFromAllTargets("PLAYMAKER_1_8_5"); DefinesHelper.RemoveSymbolFromAllTargets("PLAYMAKER_1_8_6"); DefinesHelper.RemoveSymbolFromAllTargets("PLAYMAKER_1_8_7"); DefinesHelper.RemoveSymbolFromAllTargets("PLAYMAKER_1_8_8"); DefinesHelper.RemoveSymbolFromAllTargets("PLAYMAKER_1_8_9"); }
public static void RemoveScriptingDefineSymbolFromAllTargets(string defineSymbol) { DefinesHelper.RemoveSymbolFromAllTargets(defineSymbol); }
public static void AddScriptingDefineSymbolToAllTargets(string defineSymbol) { DefinesHelper.AddSymbolToAllTargets(defineSymbol); }
private static void DoLegacyAddons() { DoSectionTitle("Legacy Systems"); EditorGUILayout.HelpBox("NOTE: Legacy systems might be removed by Unity in future releases!", MessageType.Warning); DoTopSpacer(); // Legacy Networking GUILayout.BeginHorizontal(); label.text = "Legacy Networking"; label.tooltip = "Unity's Legacy Networking system.\nClick for more info online."; if (GUILayout.Button(label, EditorStyles.label)) { Application.OpenURL(urlLegacyNetworkDocs); } GUILayout.FlexibleSpace(); #if PLAYMAKER_LEGACY_NETWORK label.text = "Disable"; label.tooltip = "Remove PLAYMAKER_LEGACY_NETWORK symbol." + "\nYou can then delete:" + "\nPlayMaker\\Actions\\Network"; if (GUILayout.Button(label, GUILayout.Width(100))) { PlayMakerDefines.RemoveScriptingDefineSymbolFromAllTargets("PLAYMAKER_LEGACY_NETWORK"); EditorStartupPrefs.UseLegacyNetworking = false; EditorUtility.DisplayDialog("PlayMaker Add-ons", "PLAYMAKER_LEGACY_NETWORK symbol removed." + "\n\nYou can now delete:" + "\nPlayMaker\\Actions\\Network", "OK"); } #else label.text = "Enable"; label.tooltip = "Define PLAYMAKER_LEGACY_NETWORK symbol." + "\nImport actions for Unity's Legacy Networking:" + "\nPlayMaker\\Actions\\Network"; if (GUILayout.Button(label, GUILayout.Width(100))) { DefinesHelper.AddSymbolToAllTargets("PLAYMAKER_LEGACY_NETWORK"); EditorUtility.DisplayDialog("PlayMaker Add-ons", "PLAYMAKER_LEGACY_NETWORK added to scripting define symbols.", "OK"); ImportAddon(AssetGUIDs.LegacyNetworkingPackage); EditorStartupPrefs.UseLegacyNetworking = true; } #endif GUILayout.EndHorizontal(); // Legacy GUI GUILayout.BeginHorizontal(); label.text = "Legacy GUI"; label.tooltip = "Actions for Unity's Legacy GUI System.\nClick for more info online."; if (GUILayout.Button(label, EditorStyles.label)) { Application.OpenURL(urlLegacyGUIDocs); } GUILayout.FlexibleSpace(); label.text = "Import"; label.tooltip = "Import actions for Unity's Legacy GUI system:" + "\nPlayMaker\\Actions\\GUIElement"; if (GUILayout.Button(label, GUILayout.Width(100))) { ImportAddon(AssetGUIDs.LegacyGUIPackage); } GUILayout.EndHorizontal(); // iTween GUILayout.BeginHorizontal(); label.text = "iTween Support"; label.tooltip = "Support for iTween (available on the Asset Store). " + "NOTE: We recommend using newer third party Tweening libraries." + "\nClick for more info online."; if (GUILayout.Button(label, EditorStyles.label)) { Application.OpenURL(urlITweenDocs); } GUILayout.FlexibleSpace(); label.text = "Import"; label.tooltip = "Import actions for iTween:" + "\nPlayMaker\\Actions\\iTween " + "\n\nNOTE: Import iTween from Asset Store first!"; if (GUILayout.Button(label, GUILayout.Width(100))) { if (EditorUtility.DisplayDialog("Import iTween Support", "You must import iTween from the Asset Store first. Have you already imported iTween?", "Yes", "No")) { ImportAddon(AssetGUIDs.LegacyITweenPackage); } } GUILayout.EndHorizontal(); DoBottomSpacer(); }