Ejemplo n.º 1
0
        IEnumerable <VFXParameter> GetParameters(Func <VFXParameter, bool> predicate)
        {
            if (m_Subgraph == null && !object.ReferenceEquals(m_Subgraph, null))
            {
                m_Subgraph = EditorUtility.InstanceIDToObject(m_Subgraph.GetInstanceID()) as VisualEffectSubgraphOperator;
            }
            if (m_Subgraph == null)
            {
                return(Enumerable.Empty <VFXParameter>());
            }
            VFXGraph graph = subgraph.GetResource().GetOrCreateGraph();

            return(VFXSubgraphUtility.GetParameters(m_SubChildren, predicate));
        }
Ejemplo n.º 2
0
        protected internal override void Invalidate(VFXModel model, InvalidationCause cause)
        {
            if (cause == InvalidationCause.kSettingChanged)
            {
                var graph = GetGraph();

                if (graph != null && m_Subgraph != null && m_Subgraph.GetResource() != null)
                {
                    var otherGraph = m_Subgraph.GetResource().GetOrCreateGraph();
                    if (otherGraph == graph || otherGraph.subgraphDependencies.Contains(graph.GetResource().visualEffectObject))
                    {
                        m_Subgraph = null;              // prevent cyclic dependencies.
                    }
                    if (graph.GetResource().isSubgraph) // BuildSubgraphDependenciesis called for vfx by recompilation, but in subgraph we must call it explicitely
                    {
                        graph.BuildSubgraphDependencies();
                    }
                }
            }

            base.Invalidate(model, cause);
        }
Ejemplo n.º 3
0
 private static extern void CreateVisualEffectSubgraph([Writable] VisualEffectSubgraphOperator subGraph);