docs.unity3d.com
    Show / Hide Table of Contents

    Spawn State

    Menu Path : Operator > Spawn > Spawn Context State

    The Spawn State Operator contains information about the state of a Spawn system. It contains information such as: the number of particles spawned in the current frame, the duration of the spawn loop, and the current delta time.

    You can only connect this Operator's outputs to Blocks in a Spawn Context. If you connect an output to a Block in another Context type, Unity throws an exception.

    Operator properties

    Output Type Description
    NewLoop Boolean Indicates whether or not a new spawn loop has started this frame. If a new loop has started, this outputs true. Otherwise, outputs false.
    LoopState Uint The current state of the spawn loop. Each value refers to a different state. The values are:
    • 0: Not looping.
    • 1: Delaying before a loop.
    • 2: Is looping.
    • 3: Delaying after a loop.
    For more information on spawn loop states, see VFXSpawnerLoopState.
    LoopIndex int The current index of the loop. Unity increments this number every time a new spawn loop starts.
    SpawnCount float The number of particles the system spawned in the current frame.
    SpawnDeltaTime float The delta time of the current frame. You can modify this value using a custom spawner.
    SpawnTotalTime float The total time since the application started.
    LoopDuration float The loop duration specified in the connected system's Spawn Context.
    LoopCount int The loop count specified in the connected system's Spawn Context.
    DelayBeforeLoop float The time the VFXSpawner waits for before it starts a new loop. This value is specified in the connected system's Spawn Context.
    DelayAfterLoop float The time the VFXSpawner waits for after it finishes a loop. This value is specified in the connected system's Spawn Context.
    In This Article
    • Operator properties
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023