Beispiel #1
0
        public static PipelineEvent GetEvent(Type type)
        {
            var events = current.resources.availiableEvents;

            for (int i = 0; i < events.Length; ++i)
            {
                PipelineEvent evt = events[i];
                if (evt.GetType() == type)
                {
                    return(evt);
                }
            }
            return(null);
        }
Beispiel #2
0
        public static T GetEvent <T>() where T : PipelineEvent
        {
            var events = current.resources.availiableEvents;

            for (int i = 0; i < events.Length; ++i)
            {
                PipelineEvent evt = events[i];
                if (evt.GetType() == typeof(T))
                {
                    return((T)evt);
                }
            }
            return(null);
        }
        public static PipelineEvent GetEvent(PipelineResources.CameraRenderingPath path, Type targetType)
        {
            var allEvents = current.resources.renderingPaths;

            PipelineEvent[] events = allEvents[path];
            for (int i = 0; i < events.Length; ++i)
            {
                PipelineEvent evt = events[i];
                if (evt.GetType() == targetType)
                {
                    return(evt);
                }
            }
            return(null);
        }
        public static T GetEvent <T>(PipelineResources.CameraRenderingPath path) where T : PipelineEvent
        {
            var allEvents = current.resources.renderingPaths;

            PipelineEvent[] events = allEvents[path];
            for (int i = 0; i < events.Length; ++i)
            {
                PipelineEvent evt = events[i];
                if (evt.GetType() == typeof(T))
                {
                    return((T)evt);
                }
            }
            return(null);
        }