コード例 #1
0
        public unsafe T GetComponent <T>()
        {
            CastHelper <T> castHelper = new CastHelper <T>();

            this.GetComponentFastPath(typeof(T), new IntPtr((void *)&castHelper.onePointerFurtherThanT));
            return(castHelper.t);
        }
コード例 #2
0
        public unsafe T GetComponent <T>()
        {
            var h = new CastHelper <T>();

            GetComponentFastPath(typeof(T), new System.IntPtr(&h.onePointerFurtherThanT));
            return(h.t);
        }
コード例 #3
0
ファイル: Component_d1.cs プロジェクト: Hengle/JellyTerain
        public unsafe T GetComponent <T>()
        {
            CastHelper <T> castHelper = default(CastHelper <T>);

            GetComponentFastPath(typeof(T), new IntPtr(&castHelper.onePointerFurtherThanT));
            return(castHelper.t);
        }
コード例 #4
0
        public unsafe bool TryGetComponent <T>(out T component)
        {
            var h = new CastHelper <T>();

            TryGetComponentFastPath(typeof(T), new System.IntPtr(&h.onePointerFurtherThanT));
            component = h.t;
            return(h.t != null);
        }
コード例 #5
0
        public unsafe bool TryGetComponent <T>(out T component)
        {
            CastHelper <T> castHelper = default(CastHelper <T>);

            this.TryGetComponentFastPath(typeof(T), new IntPtr((void *)(&castHelper.onePointerFurtherThanT)));
            component = castHelper.t;
            return(castHelper.t != null);
        }