美文网首页unity3D技术分享Unity
unity3dUGUI空对象实现射线检测

unity3dUGUI空对象实现射线检测

作者: 好怕怕 | 来源:发表于2018-07-22 11:33 被阅读7次
    using UnityEngine;
    using System.Collections;
    
    namespace UnityEngine.UI
    {
        public class Empty4Raycast : MaskableGraphic
        {
            protected Empty4Raycast()
            {
                useLegacyMeshGeneration = false;
            }
    
            protected override void OnPopulateMesh(VertexHelper toFill)
            {
                toFill.Clear();
            }
        }
    }
    
    using System;
    using System.Collections.Generic;
    using UnityEngine;
    using UnityEngine.UI;
    
    namespace UnityEngine.UI
    {
        /// <summary>
        /// 空对象启用射线检测
        /// </summary>
        public class NoDrawingRayCast : Graphic
        {
            public override void SetMaterialDirty()
    
            {
            }
    
            public override void SetVerticesDirty()
            {
    
            }
    
            [Obsolete]
            protected override void OnFillVBO(List<UIVertex> vbo)
            {
                vbo.Clear();
            }
        }
    }
    

    相关文章

      网友评论

      本文标题:unity3dUGUI空对象实现射线检测

      本文链接:https://www.haomeiwen.com/subject/tptklxtx.html