Skip to content

Game.Effects.VFXUpdateInfo

Assembly: Assembly-CSharp
Namespace: Game.Effects

Type: struct

Base: System.ValueType

Summary:
Lightweight value-type used by the game's VFX system to describe a per-update VFX operation. Carries the update kind (VFXUpdateType) and a two-component integer index (Unity.Mathematics.int2) that the VFX pipeline can use to select or enable specific effects or layers. This struct is suitable for passing through jobs or native-compatible code because it contains only value-type fields.


Fields

  • public VFXUpdateType m_Type
    This enum field specifies what kind of VFX update is requested (e.g., enable, disable, refresh — exact enum values are defined in VFXUpdateType). The VFX system reads this to determine the operation to perform for the targeted effect(s).

  • public Unity.Mathematics.int2 m_EnabledIndex
    A packed two-integer index typically used to identify a particular effect instance, layer, or slot. Uses Unity.Mathematics.int2 for small, efficient storage and good compatibility with Unity's Burst/Jobs systems. Interpret the X/Y components according to the consuming VFX code (for example, X = group index, Y = element index).

Properties

  • This struct does not expose any properties; it exposes two public fields for direct, value-type access (suitable for performance-sensitive contexts).

Constructors

  • public VFXUpdateInfo()
    Structs have an implicit parameterless constructor that zero-initializes fields. You can also initialize via an object initializer. There is no explicit constructor defined in source.

Methods

  • This struct defines no methods. It is a plain data container.

Usage Example

using Unity.Mathematics;
using Game.Effects;

// create and initialize
var info = new VFXUpdateInfo
{
    m_Type = VFXUpdateType.Enable,        // example enum value
    m_EnabledIndex = new int2(2, 1)       // group 2, element 1 (interpretation depends on consumer)
};

// pass to a VFX system or job
VFXSystem.EnqueueUpdate(info);

Notes: - Because this is a struct with simple value fields (an enum and an int2), it is efficient to pass by value and works well with Unity Jobs/Burst where blittable types are preferred. - Check the VFXUpdateType enum definition and the consuming VFX system to understand the exact semantics of m_Type and the meaning/layout of m_EnabledIndex.