Banter Visual Scripting in Unity
The Banter Unity SDK includes custom Unity Visual Scripting units for events, networking, player controls, users, browser actions, AI features, leaderboards, files, haptics, and in-world UI. These units let a Unity Script Graph call Banter features without recreating each operation as a separate C# script.
Install the required Unity package, attach a Script Machine, and build the graph from Banter event and action units.
- Install the Banter SDK and Unity Visual Scripting package.
- Add a Script Machine to the GameObject that will run the graph.
- Connect a Banter event unit to Banter action, networking, player, or UI units.
Enable the Banter Visual Scripting Units
The Banter SDK assembly definition enables its custom units when the project contains com.unity.visualscripting version 1.7.8 or later. The unit source files are guarded by the BANTER_VISUAL_SCRIPTING define, so missing Banter nodes usually indicate that the Unity package is absent, below that version, or has not compiled successfully.
Open Unity's Package Manager and confirm that Visual Scripting is installed. Unity describes Visual Scripting as a node-based workflow for designing behaviours, and its current Unity 6 documentation lists the released com.unity.visualscripting package.
After the packages compile:
- Select the GameObject that will own the logic.
- Add a Script Machine component.
- Set its source to a graph asset or an embedded graph.
- Open the graph and search the fuzzy finder for
Banteror the exact unit title.
Unity requires a Script Graph to be attached to a Script Machine before the graph can run.
Banter Event Units
Banter event units appear under the Events > Banter categories. Use an event as the entry point for a graph, then connect its control output and data outputs to the next units.
The SDK currently includes event groups for:
| Event group | Example units |
|---|---|
| Users | On User Joined, On User Left |
| Held objects | On Grab, On Release |
| Networking | On One Shot, On Space State Properties Changed |
| Controllers | On Controller Button Pressed, On Controller Button Released, axis and trigger updates |
| Browser communication | menu-browser and space-browser message events |
| UI | On UI Click and value-change events for controls |
| Voice and files | speech-to-text and file-selection results |
The On Grab unit targets a GameObject and outputs whether the left hand performed the grab. The corresponding source registers the event under Events > Banter > HeldEvents.
Networking and Shared State
The Banter networking units provide two different communication patterns:
- Set Space State Property changes a shared space property.
- Send a One Shot Message sends a string message, with an All Instances input controlling its scope.
Pair those action units with On Space State Properties Changed or On One Shot to react to shared updates. Use state properties for values that need to remain available in the space. Use one-shot messages for discrete events that receivers can handle immediately.
For a multiplayer button graph, connect:
- On UI Click
- a value or string-building unit
- Set Space State Property
- an optional local UI update
Place On Space State Properties Changed in the receiving graph when every connected user should react to that property.
Player and Controller Units
The SDK provides player-action units for movement, rotation, crouching, teleporting, grappling, jumping, and grabbing. Separate input units can block the left or right primary button, secondary button, trigger, thumbstick, or thumbstick click when the graph needs to handle that input itself.
Other player-facing units include:
- Teleport To Location
- Add Force To Player
- Lock Player
- Get User Info
- Get Voice Volume
- Send Haptic Impulse
When blocking controller input, include the matching controller event in the graph and restore the input state when the custom interaction ends.
Create In-World UI
Banter's Visual Scripting UI units cover panels, elements, hierarchy, properties, styles, UXML, and events.
A basic world-space interface can use:
- Create UI Panel on a GameObject.
- Create UI Button and Create UI Label for the controls.
- hierarchy units to attach the elements to the panel.
- property and style units to set text, size, spacing, colour, and visibility.
- On UI Click or a value-change event to respond to input.
The official Create UI Panel unit accepts a target GameObject, resolution, and screen-space setting, then returns the created BanterUIPanel. It reuses an existing panel component when the target already has one.
Other Included Unit Groups
The SDK source also includes Visual Scripting units for:
- opening the menu browser, retrieving its URL, and injecting or reading JavaScript;
- selecting GLB, JPG, or PNG files;
- speech-to-text, AI image generation, AI model generation, and base64 uploads;
- reading and updating leaderboards;
- retrieving the current space URL and users;
- loading textures from a URL;
- sending global events and Unity events;
- checking GLTF loading and taking ownership of a synced object.
Search by the exact action you need rather than placing every Banter unit into one graph.
Troubleshooting
The Banter units do not appear in the graph search.
Confirm that Unity Visual Scripting is installed and that its package version satisfies the Banter assembly definition. Resolve Console compilation errors, then allow Unity to rebuild its Visual Scripting unit database.
The Script Graph exists but does not run.
Confirm that the graph is assigned to a Script Machine on an active GameObject. A graph asset does not run until a Script Machine uses it.
A multiplayer event only updates one client.
Check whether the graph uses shared space state or a one-shot message, confirm the one-shot scope input, and make sure the receiving event unit is present in the graph that should react.
Controller input stops working after the graph runs.
Inspect every input-blocking unit used by the graph. Restore the corresponding input when the custom interaction, menu, or tool closes.
Official References
- Banter Visual Scripting source
- Banter Visual Scripting assembly definition
- Banter On Grab unit
- Banter Send One Shot unit
- Banter Create UI Panel unit
- Unity Visual Scripting manual
- Unity Script Machines and State Machines
Related Navigation
- Install the Banter Unity SDK
- Import the Banter Unity SDK Samples
- Banter Multiplayer State, Users, and Scene Events
- Banter Controller Input, Player Controls, and Haptics
- Build In-World UI with Banter
- Banter VR Documentation