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>() in Start. Cilbox adds the component for you, and Basis calls a method with a known name on your script, such as OnPlatformChanged.
  • Swapped types. You write the normal Unity name (Debug, VideoPlayer, BasisAvatar) and the sandbox serves a safe version.
ShimWhat it doesPage
BasisPlayersShimRoster, nearest player, posesPlayers
BasisVelocityShimLaunch or push the local playerPlayers
BasisPlayspaceInputShimDrive the wearer's movement from an avatarPlayers
BasisSeatShimIs the local player seated, and wherePlayers
BasisAvatarSwitchShimKnow when a player changes avatarPlayers
BasisPermissionsShimAdmin, moderator and permission checksPlayers
BasisLockShimLock movement, looking or crouchingPlayers
BasisEyeTrackingShimWhere the local player is lookingPlayers
BasisControllerInputShimVR controller buttons, triggers, sticksInput
BasisDesktopInputShimMouse buttons, movement and scrollInput
BasisHapticsShimController vibrationInput
BasisInteractableShimPressable objectsInput
BasisActionTriggerUI pointer eventsInput
BasisUIExtensionsToggle.AddListenerInput
BasisInputShimBind keys, mouse, gamepad and controls as slotsInput
BasisLocalInputShimMouse and controller reads for props and avatarsInput
BasisKeyboardShimAsk the player to type some textInput
BasisHandBlockShimStop a hand pointing, grabbing or touchingInput
BasisGrabShimWhat the local player's hands are holdingInput
BasisPlatformEventShimVR / desktop switchesEvents
BasisLanguageEventShimLanguage changesEvents
BasisGraphicsSettingsEventShimQuality changesEvents
BasisPermissionEventShimLocal permission changesEvents
BasisJiggleEventShimSomeone grabs or touches jiggle bonesEvents
BasisBeforeRenderShimLate update after IK, before drawingEvents
BasisContactEventShimContact receivers touched and releasedEvents
BasisNetworkShimNetwork events, ownershipNetworking
BasisNetworkTimeShimShared server clockNetworking
BasisSharedRandomShimSame random numbers on every clientNetworking
BasisBinaryShimFast packing of numbers and vectorsNetworking
BasisCompressionShimLZ4 compressionNetworking
BasisConnectionShimSend the player to another serverNetworking
BasisSaveShimSave data on the player's machineData
BasisServerStorageShimSave data on the serverData
BasisJsonParse JSONData
BasisWebRequestShimHTTPS GET and POSTData
BasisExternalLinkShimOpen a websiteData
BasisUrlA web address set in the inspector, read onlyData
BasisMenuShimSettings tabs and menu panelsMenus
BasisSettingRequestShimAsk the player to open one of their settingsMenus
BasisSettingFavouritesShimRead and drive the player's favourite settingsMenus
BasisGraphicsSettingsShimRead quality settingsRendering and Audio
BasisStatsShimFrame rate, bottleneck, connectionRendering and Audio
BasisComputeShimCompute shader budgetRendering and Audio
BasisVoiceRoutingShimPlay a player's voice from an objectRendering and Audio
VideoPlayerShimVideoPlayer with the URL promptRendering and Audio
BasisPlatformShimPlatform detectionRendering and Audio
BasisCameraShimCamera.Render on your own cameras, with a per frame budgetRendering and Audio
BasisSteamAudioShimSteam Audio on your own audio sources, plus world acoustic geometryRendering and Audio
BasisRemotePlayerAudioShimOverride Steam Audio on a remote player's voiceRendering and Audio
BasisSpawnShimChoose where players arrive and respawnSpawning
Instantiate (BasisCilboxInstantiateShim)Instantiate with the clone cleaned before it turns onSpawning
BasisModelShimBuild models from GLB, glTF, OBJ, STL or PLY bytesSpawning
BasisScriptBusMessages and published values between content on this clientScript Bus
BasisScriptTarget, BasisScriptMessage, BasisScriptReferenceHandles to content, messages and single scriptsScript Bus
BasisSharedTransform, BasisSharedTextureShare a transform or texture with other contentScript Bus
BasisTransformBatchShimRead or write many transforms at onceBatching
BasisTransformSyncShimCopy transforms to transforms every frameBatching
BasisBlendShapeSyncShimRead, write or copy many blendshapesBatching
BasisVectorArrayShimSplit and join vector arraysBatching
BasisSphereCastShimRay and sphere tests on arraysBatching
BasisAvatarShimThe avatar component on avatarsAvatar
BasisVixxyShimRead and drive Vixxy menu itemsAvatar
BasisPoseOverrideShimPose the local player's bones and IK targetsPose
BasisRemotePoseShimPose other players' avatars on this clientPose
BasisOscOSC messagesOSC
Debug (BasisDebugPropsShim)Logging tagged with your contentSandbox 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