private static void ProcessInit(Action <NPNFError> callback = null) { initState = NPNFPlatformInitState.Initializing; QueueInit(callback); UnityEngine.Debug.Log("NPNF Platform Init"); Settings = NPNFSettings.Instance; NPNFMain.Settings = Settings; if (NPNFMain.Settings != null) { NPNFMain.OnInitComplete += InitCompleteHandler; NPNFMain.OnInitDeviceProfile += InitDeviceProfileHandler; } CustomFeaturesInitialization(); NPNFMain.Init(); #if !UNITY_WEBPLAYER Environment.SetEnvironmentVariable("MONO_REFLECTION_SERIALIZER", "yes"); #endif }
private static void ProcessInit(PlatformInitCallback callback = null) { initState = NPNFPlatformInitState.Initializing; InitCallback = callback; UnityEngine.Debug.Log("NPNF Platform Init"); Settings = NPNFSettings.Instance; NPNFMain.Settings = Settings; if (NPNFMain.Settings != null) { NPNFMain.OnInitProfile += InitProfile; NPNFMain.OnLoadComplete += LoadComplete; } CustomFeaturesInitialization(); NPNFMain.Init(); #if !UNITY_WEBPLAYER Environment.SetEnvironmentVariable("MONO_REFLECTION_SERIALIZER", "yes"); #endif }
private void VersionsGUI() { // Handle App Version Selection GUI.enabled = !String.IsNullOrEmpty(instance.AppId) && !String.IsNullOrEmpty(instance.AppSecret) && !String.IsNullOrEmpty(instance.AdminId) && !String.IsNullOrEmpty(instance.AdminSecret); EditorGUILayout.HelpBox("Select an App Version", MessageType.None); if (!isVersionSettingsValid) { GUI.color = Color.red; } GUILayout.BeginHorizontal(); EditorGUILayout.LabelField(appVersionLabel, GUILayout.Width(180), GUILayout.Height(16)); GUIContent buttonLabel; if (haveVersions) { instance.SelectedVersionIndex = EditorGUILayout.Popup(instance.SelectedVersionIndex, instance.ClientVersions); if (instance.ClientVersions.Length > instance.SelectedVersionIndex) { instance.AppVersion = instance.ClientVersions[instance.SelectedVersionIndex]; } buttonLabel = reloadVersionsLabel; } else { buttonLabel = getVersionsLabel; } if (GUILayout.Button(buttonLabel)) { RefreshVersions(); } GUILayout.EndHorizontal(); GUI.color = Color.white; GUI.enabled = true; // Display SDK Version SelectableLabelField(sdkVersionLabel, NPNFSettings.SDK_VERSION); if (!NPNFSettings.IsValidVersion()) { EditorGUILayout.HelpBox("Mismatch SDK Version", MessageType.Error); } }
public override void OnInspectorGUI() { instance = (NPNFSettings)target; AppKeyGUI(); EditorGUILayout.Space(); AdminKeyGUI(); EditorGUILayout.Space(); VersionsGUI(); EditorGUILayout.Space(); VerifySettingsGUI(); // SSDK-1154 - force OnInspectorGUI to be called on every frame EditorUtility.SetDirty(target); instance.Update(); if (Event.current.type == EventType.Repaint) { haveVersions = instance.ClientVersions != null && instance.ClientVersions.Length > 0; } }
public override void OnInspectorGUI() { instance = (NPNFSettings)target; AppKeyGUI(); EditorGUILayout.Space(); AdminKeyGUI(); EditorGUILayout.Space(); VersionsGUI(); EditorGUILayout.Space(); AutosyncGUI(); EditorGUILayout.Space(); VerifySettingsGUI(); // SSDK-1154 - force OnInspectorGUI to be called on every frame EditorUtility.SetDirty(target); instance.Update(); if (Event.current.type == EventType.Repaint) haveVersions = instance.ClientVersions != null && instance.ClientVersions.Length > 0; }
private static void ProcessInit(Action<NPNFError> callback = null) { initState = NPNFPlatformInitState.Initializing; QueueInit(callback); UnityEngine.Debug.Log("NPNF Platform Init"); Settings = NPNFSettings.Instance; NPNFMain.Settings = Settings; if (NPNFMain.Settings != null) { NPNFMain.OnInitComplete += InitCompleteHandler; NPNFMain.OnInitDeviceProfile += InitDeviceProfileHandler; } CustomFeaturesInitialization(); NPNFMain.Init(); #if !UNITY_WEBPLAYER Environment.SetEnvironmentVariable("MONO_REFLECTION_SERIALIZER", "yes"); #endif }