ScriptingCilbox Shim Reference
Cilbox Shim Reference
Every Basis shim a Cilbox script can use, grouped by area, each with a short example.
Shims are the Basis side of the Cilbox sandbox: small, safe APIs that give a sandboxed script access to players, input, networking, saving, menus and more. Most live in the Basis.Shims namespace.
Shims come in three shapes:
- Static classes you call directly, such as
BasisPlayersShim.Count. - Event components you opt into by calling
GetComponent<T>()inStart. Cilbox adds the component for you, and Basis calls a method with a known name on your script, such asOnPlatformChanged. - Swapped types. You write the normal Unity name (
Debug,VideoPlayer,BasisAvatar) and the sandbox serves a safe version.
| Shim | What it does | Page |
|---|---|---|
BasisPlayersShim | Roster, nearest player, poses | Players |
BasisVelocityShim | Launch or push the local player | Players |
BasisPlayspaceInputShim | Drive the wearer's movement from an avatar | Players |
BasisSeatShim | Is the local player seated, and where | Players |
BasisAvatarSwitchShim | Know when a player changes avatar | Players |
BasisPermissionsShim | Admin, moderator and permission checks | Players |
BasisLockShim | Lock movement, looking or crouching | Players |
BasisEyeTrackingShim | Where the local player is looking | Players |
BasisControllerInputShim | VR controller buttons, triggers, sticks | Input |
BasisDesktopInputShim | Mouse buttons, movement and scroll | Input |
BasisHapticsShim | Controller vibration | Input |
BasisInteractableShim | Pressable objects | Input |
BasisActionTrigger | UI pointer events | Input |
BasisUIExtensions | Toggle.AddListener | Input |
BasisInputShim | Bind keys, mouse, gamepad and controls as slots | Input |
BasisLocalInputShim | Mouse and controller reads for props and avatars | Input |
BasisKeyboardShim | Ask the player to type some text | Input |
BasisHandBlockShim | Stop a hand pointing, grabbing or touching | Input |
BasisGrabShim | What the local player's hands are holding | Input |
BasisPlatformEventShim | VR / desktop switches | Events |
BasisLanguageEventShim | Language changes | Events |
BasisGraphicsSettingsEventShim | Quality changes | Events |
BasisPermissionEventShim | Local permission changes | Events |
BasisJiggleEventShim | Someone grabs or touches jiggle bones | Events |
BasisBeforeRenderShim | Late update after IK, before drawing | Events |
BasisContactEventShim | Contact receivers touched and released | Events |
BasisNetworkShim | Network events, ownership | Networking |
BasisNetworkTimeShim | Shared server clock | Networking |
BasisSharedRandomShim | Same random numbers on every client | Networking |
BasisBinaryShim | Fast packing of numbers and vectors | Networking |
BasisCompressionShim | LZ4 compression | Networking |
BasisConnectionShim | Send the player to another server | Networking |
BasisSaveShim | Save data on the player's machine | Data |
BasisServerStorageShim | Save data on the server | Data |
BasisJson | Parse JSON | Data |
BasisWebRequestShim | HTTPS GET and POST | Data |
BasisExternalLinkShim | Open a website | Data |
BasisUrl | A web address set in the inspector, read only | Data |
BasisMenuShim | Settings tabs and menu panels | Menus |
BasisSettingRequestShim | Ask the player to open one of their settings | Menus |
BasisSettingFavouritesShim | Read and drive the player's favourite settings | Menus |
BasisGraphicsSettingsShim | Read quality settings | Rendering and Audio |
BasisStatsShim | Frame rate, bottleneck, connection | Rendering and Audio |
BasisComputeShim | Compute shader budget | Rendering and Audio |
BasisVoiceRoutingShim | Play a player's voice from an object | Rendering and Audio |
VideoPlayerShim | VideoPlayer with the URL prompt | Rendering and Audio |
BasisPlatformShim | Platform detection | Rendering and Audio |
BasisCameraShim | Camera.Render on your own cameras, with a per frame budget | Rendering and Audio |
BasisSteamAudioShim | Steam Audio on your own audio sources, plus world acoustic geometry | Rendering and Audio |
BasisRemotePlayerAudioShim | Override Steam Audio on a remote player's voice | Rendering and Audio |
BasisSpawnShim | Choose where players arrive and respawn | Spawning |
Instantiate (BasisCilboxInstantiateShim) | Instantiate with the clone cleaned before it turns on | Spawning |
BasisModelShim | Build models from GLB, glTF, OBJ, STL or PLY bytes | Spawning |
BasisScriptBus | Messages and published values between content on this client | Script Bus |
BasisScriptTarget, BasisScriptMessage, BasisScriptReference | Handles to content, messages and single scripts | Script Bus |
BasisSharedTransform, BasisSharedTexture | Share a transform or texture with other content | Script Bus |
BasisTransformBatchShim | Read or write many transforms at once | Batching |
BasisTransformSyncShim | Copy transforms to transforms every frame | Batching |
BasisBlendShapeSyncShim | Read, write or copy many blendshapes | Batching |
BasisVectorArrayShim | Split and join vector arrays | Batching |
BasisSphereCastShim | Ray and sphere tests on arrays | Batching |
BasisAvatarShim | The avatar component on avatars | Avatar |
BasisVixxyShim | Read and drive Vixxy menu items | Avatar |
BasisPoseOverrideShim | Pose the local player's bones and IK targets | Pose |
BasisRemotePoseShim | Pose other players' avatars on this client | Pose |
BasisOsc | OSC messages | OSC |
Debug (BasisDebugPropsShim) | Logging tagged with your content | Sandbox Rules |
Which sandbox allows which shim is shown live in the Unity editor under Basis > Creator Guide, in the Cilbox API Reference section.
Edit on GitHub
Last updated on