private void Awake() { UI = GameObject.Find("CanvasUI").GetComponent <UIScript>(); if (UI == null) { Debug.Log("not found UI from torch"); } //Debug.Log(UI.name); }