internal static void Startup() { var state = GetWelcomeState(); if (!state.ShownForVersion.Equals(DissonanceComms.Version.ToString())) { SetWelcomeState(new WelcomeState(DissonanceComms.Version.ToString())); WelcomeWindow.ShowWindow(state); } }
private static void Update() { var state = GetWelcomeState(); if (!state.ShownForVersion.Equals(DissonanceComms.Version.ToString())) { SetWelcomeState(new WelcomeState(DissonanceComms.Version.ToString())); WelcomeWindow.ShowWindow(state); } // We only want to run this once, so unsubscribe from update now that it has run // ReSharper disable once DelegateSubtraction (Justification: I know what I'm doing... famous last words) EditorApplication.update -= Update; }