コード例 #1
0
        protected override void AwakeOverride()
        {
            base.AwakeOverride();
            RuntimeGraphicsLayer graphicsLayer = Window.GetComponent <RuntimeGraphicsLayer>();

            if (graphicsLayer == null)
            {
                graphicsLayer = Window.gameObject.AddComponent <RuntimeGraphicsLayer>();
            }

            SetLayer(transform, Window.Editor.CameraLayerSettings.RuntimeGraphicsLayer + Window.Index);
        }
コード例 #2
0
        protected virtual void Awake()
        {
            m_graphicsLayer = FindObjectOfType <RuntimeGraphicsLayer>();
            if (m_graphicsLayer == null)
            {
                GameObject go = new GameObject();
                go.AddComponent <PersistentIgnore>();
                m_graphicsLayer      = go.AddComponent <RuntimeGraphicsLayer>();
                m_graphicsLayer.name = "RuntimeGraphicsLayer";
            }

            SetLayer(transform, m_graphicsLayer.GraphicsLayer);
        }