On Update
The On Update event node starts to trigger right after the On Start event node. From there, it will execute anything chained to it, during one frame and for any consecutive frames.
Ports
Inputs
Port Name | Type | Default Value | Description |
---|---|---|---|
[Boolean] | True | If Enabled is set to true (Checked), the On Update Event will be triggered when the GameObject with the visual script get enabled. |
Outputs
Port Name | Type | Default Value | Description |
---|---|---|---|
Trigger | When the GameObject 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 Cube containing a visual script that will:
Trigger the On Start event when entering play mode
- Wait 2 seconds.
- Set the variable CanUpdate to True.
The On Update will execute When the variable CanUpdate is True.
The Elapsed time will be logged until:
- The object is destroyed.
- The object is disabled.
- The component with the script is destroyed.
- The component with the script is disabled.
- The variable CanUpdate is false.