Introduction
Overview
Scripting provides advanced functionality within the Basis framework. This documentation will guide you through creating, building and testing scripts using Unity and the Basis SDK.
Native and Cilbox
Basis has two kinds of scripts:
- Native scripts are compiled into the application. They have the full Unity and Basis API and native speed, but only exist in clients built with them. Use them when building an app or game on Basis.
- Cilbox scripts are runtime scripts. They ship inside a world, prop or avatar, are marked
[Cilboxable], and run in a sandbox on any client that loads the content. Use them for user content.
See Native and Cilbox for the full comparison.
Quick Start Guide
Native and Cilbox
Compiled into the app versus runtime scripts in content
Scripting
How to use Scripts
Common Usages
Players, input, UI, timers, loading data, saving and menus
Sandbox Rules
Cilbox gotchas and performance costs
Avatar Scripting
Scripts on avatars, wearer versus everyone
Networking
Synced variables, network events, ownership and late joiners
Examples
Complete scripts for common world and prop features
OSC
Publish and subscribe to OSC data from Basis scripts
Last updated on
Media Player
Add live video screens to your world with the Basis Media Player — OS hardware-decoded streaming into a Unity texture, with audio, surround sound and networked playback.
Native and Cilbox
The two ways to script Basis. Native scripts are compiled into the application; Cilbox scripts ship inside content and run at runtime in a sandbox.