public static void DisableFBAPI() { SA_EditorTool.ChnageDefineState(SP_FB_API_v6_Path, "FBV6_API_ENABLED", false); SA_EditorTool.ChnageDefineState(SP_FB_GrapRequest_V6_Path, "FBV6_API_ENABLED", false); SA_EditorTool.ChnageDefineState(SP_FB_API_v7_Path, "FBV7_API_ENABLED", false); SA_EditorTool.ChnageDefineState(SP_FB_GrapRequest_V7_Path, "FBV7_API_ENABLED", false); }
public static void UpdatePluginDefines() { if (PluginsInstalationUtil.IsFacebookInstalled) { int version = SA_ModulesInfo.FB_SDK_MajorVersionCode; if (version != 0) { if (version >= 7) { SA_EditorTool.ChnageDefineState(SP_FB_API_v7_Path, "FBV7_API_ENABLED", true); SA_EditorTool.ChnageDefineState(SP_FB_GrapRequest_V7_Path, "FBV7_API_ENABLED", true); } else { SA_EditorTool.ChnageDefineState(SP_FB_API_v6_Path, "FBV6_API_ENABLED", true); SA_EditorTool.ChnageDefineState(SP_FB_GrapRequest_V6_Path, "FBV6_API_ENABLED", true); } } else { DisableFBAPI(); } } else { DisableFBAPI(); } }
private void AboutGUI() { EditorGUILayout.HelpBox("About Mobile Social Plugin", MessageType.None); EditorGUILayout.Space(); SA_EditorTool.SelectableLabelField(SdkVersion, SocialPlatfromSettings.VERSION_NUMBER); SA_EditorTool.FBSdkVersionLabel(); SelectableLabelField(SupportEmail, "*****@*****.**"); }
private void AboutGUI() { EditorGUILayout.HelpBox("About the Plugin", MessageType.None); EditorGUILayout.Space(); SA_EditorTool.SelectableLabelField(SdkVersion, IOSNativeSettings.VERSION_NUMBER); SA_EditorTool.SupportMail(); SA_EditorTool.DrawSALogo(); }
public void RequestSettings() { EditorGUILayout.Space(); EditorGUILayout.HelpBox("Settings", MessageType.None); EditorGUILayout.Space(); settings.IsKeywordsOpened = EditorGUILayout.Foldout(settings.IsKeywordsOpened, "Keywords"); if (settings.IsKeywordsOpened) { if (GoogleMobileAdSettings.Instance.DefaultKeywords.Count == 0) { EditorGUILayout.HelpBox("No Default Keywords", MessageType.Info); } foreach (string keywrod in GoogleMobileAdSettings.Instance.DefaultKeywords) { EditorGUILayout.BeginVertical(GUI.skin.box); EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField(keywrod); bool IsRemoved = SA_EditorTool.SrotingButtons(keywrod, GoogleMobileAdSettings.Instance.DefaultKeywords); if (IsRemoved) { return; } EditorGUILayout.EndHorizontal(); EditorGUILayout.EndVertical(); } EditorGUILayout.BeginVertical(GUI.skin.box); EditorGUILayout.BeginHorizontal(); NewKeyword = EditorGUILayout.TextField(NewKeyword); EditorGUILayout.Space(); if (GUILayout.Button("Add new Keyword", GUILayout.Width(150))) { if (!settings.DefaultKeywords.Contains(NewKeyword)) { settings.DefaultKeywords.Add(NewKeyword); } NewKeyword = string.Empty; } EditorGUILayout.EndHorizontal(); EditorGUILayout.Space(); EditorGUILayout.EndVertical(); } settings.IsTestSettinsOpened = EditorGUILayout.Foldout(settings.IsTestSettinsOpened, "Test Devices"); if (settings.IsTestSettinsOpened) { if (GoogleMobileAdSettings.Instance.testDevices.Count == 0) { EditorGUILayout.HelpBox("No Test Devices Registred so far", MessageType.Info); } foreach (GADTestDevice device in GoogleMobileAdSettings.Instance.testDevices) { EditorGUI.indentLevel = 1; EditorGUILayout.BeginVertical(GUI.skin.box); device.IsOpen = EditorGUILayout.Foldout(device.IsOpen, device.Name); if (device.IsOpen) { EditorGUI.indentLevel = 2; EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField(deviceNameLabel); device.Name = EditorGUILayout.TextField(device.Name); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField(deviceIdLabel); device.ID = EditorGUILayout.TextField(device.ID); if (device.ID.Length > 0) { device.ID = device.ID.Trim(); } EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.Space(); if (GUILayout.Button("Remove", GUILayout.Width(80))) { GoogleMobileAdSettings.Instance.RemoveDevice(device); return; } EditorGUILayout.EndHorizontal(); EditorGUILayout.Space(); } EditorGUILayout.EndVertical(); } EditorGUI.indentLevel = 0; EditorGUILayout.BeginHorizontal(); EditorGUILayout.Space(); if (GUILayout.Button("Register New Device", GUILayout.Width(135))) { GoogleMobileAdSettings.Instance.AddDevice(new GADTestDevice()); } EditorGUILayout.EndHorizontal(); EditorGUILayout.Space(); } settings.TagForChildDirectedTreatment = SA_EditorTool.ToggleFiled("Tag For Child Directed Treatment", settings.TagForChildDirectedTreatment); }