private void Awake() { bGScript = FindObjectOfType <BGScript>(); _taskDiscription = GetComponent <TaskDiscription>(); _holder = FindObjectOfType <Holder>(); _ecnomySystem = FindObjectOfType <EcnomySystem>(); }
private void Awake() { if (BgInstance != null && BgInstance != this) { Destroy(this.gameObject); return; } BgInstance = this; DontDestroyOnLoad(this); }