4.3 KiB
On Mouse Up As Button node
Note
The On Mouse Up As Button [!includenodes-note-manual]
The On Mouse Up As Button node listens for a user to release their mouse button after they click a Collider in your application. [!includenodes-desc-end]
To trigger the On Mouse Up As Button node, the user must release their mouse button over the same Collider they clicked. If you want the user to trigger the node after they release their mouse button at any location in your application, use the On Mouse Up node instead.
Fuzzy finder category
The On Mouse Up As Button node is in the Events > Input category in the fuzzy finder.
Inputs
The On Mouse Up As Button [!includenodes-single-input]
Name | Type | Description |
---|---|---|
Target | GameObject | The GameObject the user must click and release with their mouse button to trigger the node. |
Additional node settings
The On Mouse Up As Button [!includenodes-additional-settings]
[!include[nodes-coroutine](./snippets/nodes-coroutine.md)]Name | Type | Description |
---|
Outputs
The On Mouse Up As Button [!includenodes-single-output]
[!include[nodes-input-output-trigger](./snippets/input-manager/nodes-input-output-trigger.md)]Name | Type | Description |
---|
Example graph usage
In the following example, the On Mouse Up As Button node runs as a coroutine to load a new scene after the user clicks and releases their mouse button over the Target GameObject. The Script Graph loads the scene, makes the graph wait until the scene loads, then sets the loaded scene as the active scene in the application.
When the application starts, the active scene contains a plane with three spheres.
After the Script Graph runs, the scene changes to a plane with a single cube.
Related nodes
[!includenodes-related] On Mouse Up As Button node: