static internal VFXEventAttribute Internal_InstanciateVFXEventAttribute(VisualEffectAsset vfxAsset)
        {
            var eventAttribute = new VFXEventAttribute(Internal_Create(), true, vfxAsset);

            eventAttribute.Internal_InitFromAsset(vfxAsset);
            return(eventAttribute);
        }
Example #2
0
        internal static VFXEventAttribute Internal_InstanciateVFXEventAttribute(VisualEffectAsset vfxAsset)
        {
            VFXEventAttribute vFXEventAttribute = new VFXEventAttribute(VFXEventAttribute.Internal_Create(), true, vfxAsset);

            vFXEventAttribute.Internal_InitFromAsset(vfxAsset);
            return(vFXEventAttribute);
        }
Example #3
0
 private void CheckValidVFXEventAttribute(VFXEventAttribute eventAttribute)
 {
     if (eventAttribute != null && eventAttribute.vfxAsset != visualEffectAsset)
     {
         throw new InvalidOperationException("Invalid VFXEventAttribute provided to VisualEffect, has been created with another VisualEffectAsset");
     }
 }
        private void CheckValidVFXEventAttribute(VFXEventAttribute eventAttribute)
        {
            bool flag = eventAttribute != null && eventAttribute.vfxAsset != this.visualEffectAsset;

            if (flag)
            {
                throw new InvalidOperationException("Invalid VFXEventAttribute provided to VisualEffect. It has been created with another VisualEffectAsset. Use CreateVFXEventAttribute.");
            }
        }
 public sealed override bool ApplyToVFX(VFXEventAttribute eventAttribute)
 {
     if (!m_HasFunc(eventAttribute, id))
     {
         return(false);
     }
     m_ApplyFunc(eventAttribute, id, value);;
     return(true);
 }
Example #6
0
        public VFXEventAttribute CreateVFXEventAttribute()
        {
            if (visualEffectAsset == null)
            {
                return(null);
            }
            var vfxEventAttribute = VFXEventAttribute.Internal_InstanciateVFXEventAttribute(visualEffectAsset);

            return(vfxEventAttribute);
        }
 public VFXEventAttribute(VFXEventAttribute original)
 {
     if (original == null)
     {
         throw new ArgumentNullException("VFXEventAttribute expect a non null attribute");
     }
     m_Ptr      = Internal_Create();
     m_VfxAsset = original.m_VfxAsset;
     Internal_InitFromEventAttribute(original);
 }
Example #8
0
        private void Release()
        {
            bool flag = this.m_Owner && this.m_Ptr != IntPtr.Zero;

            if (flag)
            {
                VFXEventAttribute.Internal_Destroy(this.m_Ptr);
            }
            this.m_Ptr      = IntPtr.Zero;
            this.m_VfxAsset = null;
        }
Example #9
0
        public VFXEventAttribute(VFXEventAttribute original)
        {
            bool flag = original == null;

            if (flag)
            {
                throw new ArgumentNullException("VFXEventAttribute expect a non null attribute");
            }
            this.m_Ptr      = VFXEventAttribute.Internal_Create();
            this.m_VfxAsset = original.m_VfxAsset;
            this.Internal_InitFromEventAttribute(original);
        }
        public VFXEventAttribute CreateVFXEventAttribute()
        {
            bool flag = this.visualEffectAsset == null;
            VFXEventAttribute result;

            if (flag)
            {
                result = null;
            }
            else
            {
                VFXEventAttribute vFXEventAttribute = VFXEventAttribute.Internal_InstanciateVFXEventAttribute(this.visualEffectAsset);
                result = vFXEventAttribute;
            }
            return(result);
        }
Example #11
0
 public extern void CopyValuesFrom([NotNull("ArgumentNullException")] VFXEventAttribute eventAttibute);
 extern public void CopyValuesFrom([NotNull] VFXEventAttribute eventAttibute);
Example #13
0
 public void Play(VFXEventAttribute eventAttribute)
 {
     SendEvent(VisualEffectAsset.PlayEventID, eventAttribute);
 }
Example #14
0
 public void Stop(VFXEventAttribute eventAttribute)
 {
     SendEvent(VisualEffectAsset.StopEventID, eventAttribute);
 }
Example #15
0
 public void SendEvent(string eventName, VFXEventAttribute eventAttribute)
 {
     SendEvent(Shader.PropertyToID(eventName), eventAttribute);
 }
 extern internal void Internal_InitFromEventAttribute(VFXEventAttribute vfxEventAttribute);
 public VFXOutputEventArgs(int nameId, VFXEventAttribute eventAttribute)
 {
     this.< nameId > k__BackingField         = nameId;
     this.< eventAttribute > k__BackingField = eventAttribute;
 }
Example #18
0
 extern private void SendEventFromScript(int eventNameID, VFXEventAttribute eventAttribute);
 public abstract bool ApplyToVFX(VFXEventAttribute eventAttribute);
Example #20
0
 public void SendEvent(int eventNameID, VFXEventAttribute eventAttribute)
 {
     CheckValidVFXEventAttribute(eventAttribute);
     SendEventFromScript(eventNameID, eventAttribute);
 }
 public VFXOutputEventArgs(int nameId, VFXEventAttribute eventAttribute)
 {
     this.nameId         = nameId;
     this.eventAttribute = eventAttribute;
 }