docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    On Start

    The On Start event node is triggered when the object containing the script is enabled and runs only one time. Use the On Update event if your action needs to run at every frame.

    Ports

    Inputs

    Port Name Type Default Value Description
    [Boolean] True If Enabled is set to true (Checked), the On Start event will be triggered when the object with the visual script get enabled.

    Outputs

    Port Name Type Default Value Description
    Trigger When the object is enabled, this port will trigger the next action you want to execute by connecting it to any Input Execution Flow port.

    Examples

    In this example, we have a game object (CubeAlive) containing a visual script. When we go in play mode, the script will log "I'm Alive!" in the console 2 seconds after starting.

    Data Setup

    Game object needs the following components

    • Convert to Entity. Set to Convert And Destroy
    • Scripting Graph Authoring pointing on our visual script.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)