|
|
|
|
|
|
{ |
|
|
|
if (showOnStartup && !GameplayIngredientsSettings.currentSettings.disableWelcomeScreenAutoStart) |
|
|
|
EditorApplication.update += ShowAtStartup; |
|
|
|
|
|
|
|
EditorApplication.quitting += EditorApplication_quitting; |
|
|
|
} |
|
|
|
|
|
|
|
const string kShowNextPreference = "GameplayIngredients.WelcomeScreen.ShowNextTime"; |
|
|
|
|
|
|
|
private static void EditorApplication_quitting() |
|
|
|
{ |
|
|
|
EditorPrefs.SetBool(kShowNextPreference, true); |
|
|
|
if (!Application.isPlaying) |
|
|
|
if (!Application.isPlaying && EditorPrefs.GetBool(kShowNextPreference, true)) |
|
|
|
EditorPrefs.SetBool(kShowNextPreference, false); |
|
|
|
} |
|
|
|
EditorApplication.update -= ShowAtStartup; |
|
|
|
} |
|
|
|