void Awake() { if (inited) { Destroy(gameObject); return; } inited = true; instance = this; DontDestroyOnLoad(gameObject); progressState = Resources.Load <ProgressState>("ProgressState"); if (progressState == null) { Debug.LogWarning("ProgressState not founded resources. Using default settings"); progressState = ScriptableObject.CreateInstance <ProgressState>(); } progressState.LoadState(); }