コード例 #1
0
        public static TempList <T> GetComponentsInParentNonAlloc <T>(this Component component, bool includeInactive)
        {
            var buffer = Allocators.GetBuffer <T>();

            component.GetComponentsInParent(includeInactive, buffer.list);
            return(buffer);
        }
コード例 #2
0
        public static TempList <T> GetComponentsNonAlloc <T>(this GameObject go)
        {
            var buffer = Allocators.GetBuffer <T>();

            go.GetComponents(buffer.list);
            return(buffer);
        }
コード例 #3
0
        public static TempList <Component> GetComponentsNonAlloc(this Component component, Type type)
        {
            var buffer = Allocators.GetBuffer <Component>();

            component.GetComponents(type, buffer.list);
            return(buffer);
        }
コード例 #4
0
        public static TempList <T> GetComponentsNonAlloc <T>(this Component component)
        {
            var buffer = Allocators.GetBuffer <T>();

            component.GetComponents(buffer.list);
            return(buffer);
        }
コード例 #5
0
        public static TempList <T> GetComponentsInChildrenNonAlloc <T>(this GameObject go, bool includeInactive)
        {
            var buffer = Allocators.GetBuffer <T>();

            go.GetComponentsInChildren(includeInactive, buffer.list);
            return(buffer);
        }
コード例 #6
0
        public static TempList <Component> GetComponentsNonAlloc(this GameObject go, Type type)
        {
            var buffer = Allocators.GetBuffer <Component>();

            go.GetComponents(type, buffer.list);
            return(buffer);
        }