12345678910111213141516171819202122232425262728293031323334 |
- using UnityEditor;
- using UnityEngine;
- using System;
- using System.Collections;
- namespace LuxURPEssentials
- {
- [InitializeOnLoad]
- public class LuxURPEssentialsShowWelcome : MonoBehaviour
- {
-
- static LuxURPEssentialsShowWelcome()
- {
- // To show it at start up
- EditorApplication.update += Update;
- }
- static void Update()
- {
- EditorApplication.update -= Update;
- if( !EditorApplication.isPlayingOrWillChangePlaymode )
- {
- var hide = EditorPrefs.GetBool("LuxURPEssentialsDoNotShowWelcome");
- if(!hide)
- {
- LuxURPEssentialsWelcome.Init();
- }
- }
- }
- }
- }
|