void OnGUI() { EditorGUILayout.Space(); EditorGUILayout.LabelField("Billing Plugin Setup", EditorStyles.boldLabel); EditorGUILayout.LabelField("Choose the store plugins you would like to use per platform:"); EditorGUILayout.Space(); EditorGUI.BeginChangeCheck(); androidPlugin = (AndroidPlugin)EditorGUILayout.EnumPopup("Android", androidPlugin); desktopPlugin = (DesktopPlugin)EditorGUILayout.EnumPopup("Standalone", desktopPlugin); webPlugin = (WebPlugin)EditorGUILayout.EnumPopup("WebGL", webPlugin); GUILayout.Space(15); playfabPlugin = (PlayfabPlugin)EditorGUILayout.EnumPopup("PlayFab Service", playfabPlugin); GUILayout.Space(20); EditorGUILayout.LabelField("Unity IAP will be used by default for all other platforms."); if (EditorGUI.EndChangeCheck()) { isChanged = true; } if (isChanged) { GUI.color = Color.yellow; } if (GUILayout.Button("Apply")) { ApplyScriptingDefines(); //SetPluginPlatformSettings(); isChanged = false; } }
void OnEnable() { androidPlugin = (AndroidPlugin)FindScriptingDefineIndex(BuildTargetGroup.Android, androidPluginNames); desktopPlugin = (DesktopPlugin)FindScriptingDefineIndex(BuildTargetGroup.Standalone, desktopPluginNames); webPlugin = (WebPlugin)FindScriptingDefineIndex(BuildTargetGroup.WebGL, webPluginNames); //check if cross-platform use exists playfabPlugin = (PlayfabPlugin)FindScriptingDefineIndex(BuildTargetGroup.Android, playfabPluginNames); }