using UnityEngine; [RequireComponent(typeof(Canvas))] public class DCanvasComponent : MonoBehaviour { [HideInInspector] public Canvas m_Canvas; private void Awake() { m_Canvas = GetComponent(); DCanvasLayerHandler.iAddCanvas(m_Canvas, false); } private void Start() { m_Canvas = GetComponent(); DCanvasLayerHandler.iAddCanvas(m_Canvas); } }