private void OnOutOfSync(Lifetime lifetime) { if (myPluginInstallations.Contains(mySolution.SolutionFilePath)) { return; } // avoid displaying Notification multiple times on each AppDomain.Reload in Unity myPluginInstallations.Add(mySolution.SolutionFilePath); var appVersion = myUnityVersion.ActualVersionForSolution.Value; if (appVersion < new Version(2019, 2)) { var entry = myBoundSettingsStore.Schema.GetScalarEntry((UnitySettings s) => s.InstallUnity3DRiderPlugin); var isEnabled = myBoundSettingsStore.GetValueProperty <bool>(lifetime, entry, null).Value; if (!isEnabled) { myFrontendBackendHost.Do(model => model.OnEditorModelOutOfSync()); } } else { var notification = new NotificationModel("Advanced Unity integration is unavailable", $"Make sure Rider {myHostProductInfo.VersionMarketingString} is set as the External Editor in Unity preferences.", true, RdNotificationEntryType.WARN, new List <NotificationHyperlink>()); mySolution.Locks.ExecuteOrQueue(lifetime, "OutOfSyncModels.Notify", () => myNotificationsModel.Notification(notification)); } }
private void UpdateFrontendEditorState(FrontendBackendHost frontendBackendHost, ILogger logger) { logger.Trace($"Sending connection state to frontend: {myEditorState}"); frontendBackendHost.Do(m => m.UnityEditorState.Value = myEditorState); }