// This an entry point static PluginEntryPoint() { ourModel = new RProperty <UnityModel>(); var logSender = new UnityEventLogSender(ourModel); logSender.UnityLogRegisterCallBack(); ourPluginSettings = new PluginSettings(); ourRiderPathLocator = new RiderPathLocator(ourPluginSettings); var riderPath = ourRiderPathLocator.GetDefaultRiderApp(EditorPrefsWrapper.ExternalScriptEditor, RiderPathLocator.GetAllFoundPaths(ourPluginSettings.OperatingSystemFamilyRider)); if (string.IsNullOrEmpty(riderPath)) { return; } AddRiderToRecentlyUsedScriptApp(riderPath); if (!PluginSettings.RiderInitializedOnce) { EditorPrefsWrapper.ExternalScriptEditor = riderPath; PluginSettings.RiderInitializedOnce = true; } if (Enabled) { Init(); } }
// This an entry point static PluginEntryPoint() { if (UnityEditorInternal.InternalEditorUtility.inBatchMode) { return; } PluginSettings.InitLog(); // init log before doing any logging UnityEventLogSender.Start(); // start collecting Unity messages asap ourPluginSettings = new PluginSettings(); ourRiderPathProvider = new RiderPathProvider(ourPluginSettings); if (IsLoadedFromAssets()) // old mechanism, when EditorPlugin was copied to Assets folder { var riderPath = ourRiderPathProvider.GetActualRider(EditorPrefsWrapper.ExternalScriptEditor, RiderPathLocator.GetAllFoundPaths(ourPluginSettings.OperatingSystemFamilyRider)); if (!string.IsNullOrEmpty(riderPath)) { AddRiderToRecentlyUsedScriptApp(riderPath); if (IsRiderDefaultEditor() && PluginSettings.UseLatestRiderFromToolbox) { EditorPrefsWrapper.ExternalScriptEditor = riderPath; } } if (!PluginSettings.RiderInitializedOnce) { EditorPrefsWrapper.ExternalScriptEditor = riderPath; PluginSettings.RiderInitializedOnce = true; } InitForPluginLoadedFromAssets(); Init(); } else { Init(); } }