private static VFXEventAttribute InvokeGetCachedEventAttributeForOutputEvent_Internal(VisualEffect source)
        {
            //If outputEventReceived is null, skip this behavior, InvokeOutputEventReceived_Internal will be not triggered
            if (source.outputEventReceived == null)
            {
                return(null);
            }

            if (source.m_cachedEventAttribute == null)
            {
                source.m_cachedEventAttribute = source.CreateVFXEventAttribute();
            }
            return(source.m_cachedEventAttribute);
        }
Exemplo n.º 2
0
        static VFXEventAttribute ComputeAttribute(VisualEffect vfx, EventAttributes attributes)
        {
            if (attributes.content == null || attributes.content.Length == 0)
            {
                return(null);
            }

            var vfxAttribute = vfx.CreateVFXEventAttribute();

            if (attributes.content.Count(x => x?.ApplyToVFX(vfxAttribute) == true) == 0)
            {
                //We didn't setup any vfxEventAttribute, ignoring the event payload
                return(null);
            }

            return(vfxAttribute);
        }
        private static VFXEventAttribute InvokeGetCachedEventAttributeForOutputEvent_Internal(VisualEffect source)
        {
            bool flag = source.outputEventReceived == null;
            VFXEventAttribute result;

            if (flag)
            {
                result = null;
            }
            else
            {
                bool flag2 = source.m_cachedEventAttribute == null;
                if (flag2)
                {
                    source.m_cachedEventAttribute = source.CreateVFXEventAttribute();
                }
                result = source.m_cachedEventAttribute;
            }
            return(result);
        }