Skip to content

Game.Effects.EnabledEffectFlags

Assembly: Assembly-CSharp.dll
Namespace: Game.Effects

Type: enum

Base: System.Enum (underlying type: System.UInt32)

Summary:
A bitflags enum used by the game's effects system to represent state and characteristics of an effect instance (visual/audio/light effects, ownership/temporary flags, transform/color randomization, deletion/updated markers, etc.). Each member is a single bit and can be combined to represent multiple simultaneous states. Treat the enum as an unsigned 32-bit flags container when reading/writing effect state in mod code or native memory patches.


Fields

  • IsEnabled = 1u
    Indicates the effect is currently enabled/active.

  • EnabledUpdated = 2u
    Mark used to indicate the enabled state was updated (e.g., changed this frame or since last sync).

  • Deleted = 4u
    Marks the effect for deletion/cleanup. Effects with this flag should not be processed further.

  • IsLight = 8u
    Identifies the effect as a light-type effect.

  • IsVFX = 0x10u
    Identifies the effect as a visual (particle/visual) effect.

  • IsAudio = 0x20u
    Identifies the effect as an audio effect.

  • AudioDisabled = 0x40u
    Audio for this effect has been disabled/muted.

  • EditorContainer = 0x80u
    Flag used for editor-created/contained effects (editor-specific grouping or lifetime semantics).

  • RandomTransform = 0x100u
    Indicates the effect uses randomized transform (position/rotation/scale) parameters.

  • TempOwner = 0x200u
    Marks the effect as having a temporary owner (transient ownership semantics).

  • DynamicTransform = 0x400u
    Effect transform is dynamic and may be updated frequently.

  • RandomColor = 0x800u
    Effect uses randomized color(s).

  • OwnerUpdated = 0x1000u
    Owner information for the effect was updated.

  • OwnerCollapsed = 0x2000u
    Owner entity collapsed/was removed; effect may need special handling.

  • WrongPrefab = 0x4000u
    Effect was instantiated with an unexpected/wrong prefab (used as an error/defensive flag).

Properties

  • This enum type does not define properties. Use bitwise operations or Enum.HasFlag to query or modify flags.

Constructors

  • Enums do not have constructors. The default (zero) value means no flags are set.

Methods

  • The enum itself defines no methods. Use standard bitwise operators and Enum utilities:
  • Check: (flags & EnabledEffectFlags.IsEnabled) != 0 or flags.HasFlag(...)
  • Set: flags |= EnabledEffectFlags.RandomColor;
  • Clear: flags &= ~EnabledEffectFlags.AudioDisabled;
  • Read/write raw: uint raw = (uint)flags; flags = (EnabledEffectFlags)raw;

Usage Example

// Typical usage when reading/modifying an effect's flags:
EnabledEffectFlags flags = EnabledEffectFlags.IsEnabled | EnabledEffectFlags.IsVFX;

// Check whether the effect is enabled
if ((flags & EnabledEffectFlags.IsEnabled) != 0)
{
    // process visual effect
}

// Set a flag
flags |= EnabledEffectFlags.RandomColor;

// Clear a flag
flags &= ~EnabledEffectFlags.AudioDisabled;

// Using HasFlag (note: slightly slower, but clearer)
if (flags.HasFlag(EnabledEffectFlags.IsVFX))
{
    // handle VFX-specific logic
}

// Raw storage / interoperability with native memory or packed fields
uint raw = (uint)flags;
// ... write raw to memory or read raw from memory ...
flags = (EnabledEffectFlags)raw;