Ejemplo n.º 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);
        }
        public unsafe T GetComponent <T>()
        {
            var h = new CastHelper <T>();

            GetComponentFastPath(typeof(T), new System.IntPtr(&h.onePointerFurtherThanT));
            return(h.t);
        }
Ejemplo n.º 3
0
        public unsafe T GetComponent <T>()
        {
            CastHelper <T> castHelper = default(CastHelper <T>);

            GetComponentFastPath(typeof(T), new IntPtr(&castHelper.onePointerFurtherThanT));
            return(castHelper.t);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }