Skip to main content
Skip table of contents

Set Behaviour State

The set behaviour state is a handy way of turning custom scripts (Grabbable Open XR, YourCustomScript.cs etc.) on and off through the graph. This is useful in many cases but some examples are, turning a grabbable off so a user cant interact with an object anymore or perhaps some custom functionality that you have implemented be turned on or off via the graph.
Want to toggle on or off a script that is a Unity Built in one? Then use Set Component State instead.

Setup

image-20240115-165126.png

A Set Behaviour State Node

Follow these steps to set up a new Set Component State Action.

  1. Open a graph.

  2. Right click and Create a new Set Behaviour State Action (Actions → Set Behaviour State).

  3. Reference the custom script you want to turn on or off.

  4. Set its state to be either on or off.

That's it. Now when a the action is called the chosen component will be set to the selected state.

For more information on the other inputs and outputs found on this node see Actions

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.