public AssetStoreProduct(string _pName, string _pVersion, string _logoPath) { // Set properties ProductName = _pName; ProductVersion = _pVersion; #if UNITY_EDITOR // Load logo texture LogoTexture = AssetDatabase.LoadAssetAtPath(_logoPath, typeof(Texture2D)) as Texture2D; if (LogoTexture != null) { LogoTexture.hideFlags = HideFlags.HideAndDontSave; } float _recheckAfterSecs = kCheckForUpdatesAfterMinutes * 60f; float _firstCheckAfterSecs = _recheckAfterSecs; // Check at unity application launch if (EditorApplication.timeSinceStartup < 100f) { _firstCheckAfterSecs = 1f; } EditorInvoke.InvokeRepeating(AutoCheckForUpdates, _firstCheckAfterSecs, _recheckAfterSecs); #endif }
private EditorNotificationCenter() { ScheduledLocalNotifications = new List <CrossPlatformNotification>(); LocalNotifications = new List <CrossPlatformNotification>(); RemoteNotifications = new List <CrossPlatformNotification>(); // Invoke methods EditorInvoke.InvokeRepeating(MonitorScheduledLocalNotifications, 1f, 1f); }
static NPSettings() { EditorInvoke.Invoke(() => { NPSettings _instance = NPSettings.Instance; // Save configuration once _instance.SaveConfigurationChanges(); }, 1f); EditorInvoke.InvokeRepeating(() => { NPSettings _instance = NPSettings.Instance; // Monitor player settings changes _instance.MonitorPlayerSettings(); }, 1f, 1f); }
static NPSettings() { #if DISABLE_AUTO_GENERATE_SETTINGS_FILES EditorInvoke.Invoke(() => { #pragma warning disable NPSettings _instance = NPSettings.Instance; #pragma warning restore }, 1f); #else EditorInvoke.InvokeRepeating(() => { NPSettings _instance = NPSettings.Instance; // Monitor player settings changes _instance.MonitorPlayerSettings(); }, 1f, 1f); #endif }
static NPSettings() { #if UNITY_EDITOR && !DISABLE_NPSETTINGS_GENERATION EditorInvoke.Invoke(() => { NPSettings _instance = NPSettings.Instance; // Save configuration once _instance.SaveConfigurationChanges(); }, 1f); EditorInvoke.InvokeRepeating(() => { NPSettings _instance = NPSettings.Instance; // Monitor player settings changes _instance.MonitorPlayerSettings(); }, 1f, 1f); #endif }