Skip to content

Get Sansar

Script API

Sansar.Simulation

Where: Client
More page actions

For the complete documentation index, see llms.txt. This page is also available as Markdown.

Scene, object, avatar, physics, animation and interaction APIs.

TypeKindSummary
AgentInfoClassThe AgentInfo class has basic information and IDs for an agent.
AgentPrivateClassThe AgentPrivate class is the full interface for interactions with avatars.
AgentPublicClassThe AgentPublic class is a more limited subset of the AgentPrivate API for use by other scripts in the scene.
AgentScriptClassExtend AgentScript to create a script to be attached directly to an agent. For future use: Sansar does not currently support adding scripts to agents.
AnimationClassRepresents a scriptable Animation node.
AnimationBoneSubsetEnumEnumeration for different animation skeleton subsets
AnimationComponentClassThe AnimationComponent handles interactions with animations.
AnimationComponent.SubscriptionHandlerDelegateAnimation events.
AnimationDataClassAnimation events.
AnimationParametersStructThe AnimationParameters struct contains settings for playing animations.
AnimationPlaybackModeEnumEnumeration for the different animation playback modes
AudioComponentClassThe AudioComponent handles interactions with audio components.
CameraComponentClassThe CameraComponent handles interactions with cameras.
CameraControlModeEnumType of camera mode a user is in.
CameraShakeHandleClassStops a shake requested by the creating script; it does not report client playback.
CameraShakePatternEnumSelects the motion used by a camera shake.
CameraShakeSettingsClassConfigures a camera shake; changes affect subsequent starts only.
CharacterAnimationClassThe CharacterAnimation class represents an animation that can be played on a character component.
CharacterComponentClassThe CharacterComponent handles character specific operations like playing CharacterAnimations.
CharacterTrackerClassThe CharacterTracker keeps track of the quests associated with a QuestCharacter for a user.
CharacterTrackerDataClassHandler for Character Tracker update events.
ChatClassThe Chat class handles chat subscriptions and sending messages to users and other scripts.
Chat.SubscriptionHandlerDelegateSubscribe to receive events on chat messages from the system, users or scripts.
ChatDataClassSubscribe to receive events on chat messages from the system, users or scripts.
ClientClassThe Client class is used for access to the Client connected to a AgentPrivate.
ClusterClassThe Cluster class handles interactions with in game objects.
ClusterIdStructEncapsulates an Cluster Id.
ClusterResourceClassThe ClusterResource class represents a cluster that could be added to the scene. See ScenePrivate.CreateCluster.
CollisionDataClassHandler for rigid body events.
CollisionEventPhaseEnumPhase for events that encapsulate sequence of occurrences
CollisionEventTypeEnumType of collision event.
CommandActionEnumSpecifies a command action.
CommandDataClassCommand events are generated by the client when input events occur.
ComponentTypeEnumType of component. See ObjectPrivate.GetComponent
ControlPointTypeEnumControl points are a representation of some spatial inputs, primarily VR controllers.
DataStoreClassThe DataStore class provides access to a persistent data store that can be accessed by scripts from any experience.
DataStore.OptionsStructControls how various DataStore operations proceed.
DataStore.Result<T>ClassHolds the result of operations on a DataStore.
HeldObjectDataClassHandler for agent grab events.
HeldObjectEventTypeEnumType of held object event.
HeldObjectInfoStructInformation about if this HeldObjectInfo is being held by an agent.
HttpClientClassThe Http Client can be used to make HTTP requests to external services.
HttpClient.RequestDataClassThe result of a HttpClient.Request call.
HttpRequestMethodEnumEnumerates the possible Http Request Methods
HttpRequestOptionsStructOptions used for HttpClient.Request
HttpResponseStructData returned from HttpClient.Request
InteractionClass
InteractionDataClassHandler for Interaction events.
InterpolationModeEnumType of interpolation to use for various interfaces
LightComponentClassThe LightComponent handles interactions with lights.
LightTypeEnumEnumeration for the different types of lights
MaterialPropertiesStruct
MediaActionEnumSpecial actions to perform on media surfaces with SetMediaAction
MeshComponentClassThe MeshComponent handles interactions with static meshes.
MirrorComponentClassThe MirrorComponent handles interactions with mirrors.
ModalDialogClassManages a modal dialog which can be presented to the user.
MoveModeEnumType of interpolation to use for movement
MoverClassThe Mover handles adding moves to process for an object.
ObjectPrivateClassInterface to an object in a Cluster in the Scene.
ObjectPrivate.AddInteractionDataClassThe result of AddInteraction request.
ObjectPublicClassThe ObjectPublic class is a more limited subset of the ObjectPrivate API for use by other scripts in the scene.
ObjectScriptClassExtend SceneObjectScript to create a script that can be used on content that is rezzable in a scene.
ObjectiveClassThe Objective is the interface for a user’s Quest Objective
ObjectiveDataClassHandler for Objective state change events.
ObjectiveDefinitionClassThe ObjectiveDefinition stores the data that is used to create quest objective instances for users.
ObjectiveDefinition.GetObjectiveDataClass
ObjectiveStateEnumState of a quest objective for a user.
PlayHandleClassThe PlayHandle represents audio play handles.
PlaySettingsStructThe PlaySettings class contains settings for playing sounds.
PlayStatusEnumCurrent status of the PlayStatus.
QuestClassThe Quest is the interface for a user’s progress in a Quest.
QuestCharacterClassThe QuestCharacter is the interface for a Quest Character
QuestDataClassHandler for Quest state change events.
QuestDefinitionClassThe QuestDefinition stores the data that is used to create quest instances for users.
QuestDefinition.GetQuestDataClass
QuestStateEnumState of a quest for a user.
RagdollRegionEnumFlags for targeting specific ragdoll body regions. Combine with bitwise OR.
RayCastHitStructResult of a Raycast.
ReactionDataClassSubscribe to receive reaction events from users.
ReactionsClassThe Reactions class subscriptions to user reaction events.
RenderMaterialClassThe RenderMaterial handles interactions with render materials.
RigidBodyComponentClassThe RigidBodyComponent handles interactions with rigid body physics.
RigidBodyComponent.SubscriptionHandlerDelegateHandler for rigid body events.
RigidBodyMotionTypeEnumType of motion that can be applied to a rigid body.
SceneInfoClassInformation about a Scene.
SceneObjectScriptClassExtend SceneObjectScript to create a script that can be used on content that is natively in the scene. This is the primary script type in Sansar.
ScenePrivateClassInterface for Scripts that are part of a Scene. A more complete and less limited API than ScenePublic
ScenePrivate.CreateClusterDataClassThe result of a create cluster request.
ScenePrivate.CreateClusterHandlerDelegateHandler for CreateCluster
ScenePublicClassThe Public Scene API, a more limited subset of ScenePrivate.
ScriptCameraControlModeEnumType of control mode to use for a script camera.
SimpleScriptClassExtend SimpleScript to create a script that can be used on content that is natively in the scene. This is the primary script type in Sansar.
SimpleScript.OnAddUserOptionsAttribute Client documentation onlyClassUse to create additional OnAddUser subscriptions
SimpleScript.OnChatOptionsAttributeClassSet options for OnChat() overrides, or use to create more simple chat handlers.
SimpleScript.OnCollisionOptionsAttributeClassSet options for OnCollision events, or use to create more simple collision handlers.
SimpleScript.OnRemoveUserOptionsAttribute Client documentation onlyClassUse to create additional OnRemoveUser subscriptions
SimpleScript.OnScriptEventOptionsAttributeClassSet options for OnScriptEvent events.
SimpleScript.OnTimerOptionsAttributeClassSet options for OnTimer() overrides, or use to create more simple timers.
SimpleScript.SimpleScriptOptionsAttributeClassInternal Use Only
SitEventTypeEnumType of sit event.
SitObjectDataClassHandler for agent sit events.
SitObjectInfoStructInformation about if an agent is sitting on this SitObjectInfo.
SoundResourceClassThe SoundResource class represents a sound that could be added to the scene.
StreamChannelEnumFor playing a stream from the scene.
TextureResourceClassThe TextureResource class represents a texture from the inventory, such as a color LUT. See ScenePrivate.SetColorLut.
ThumbnailedClusterResourceClassThe ThumbnailedClusterResource class represents a cluster that has properties to be shown in the UI.
TimeOfDayModeEnumHow a scene’s time of day runs.
TutorialHintEnumTutorial hint types.
TwitchDataClassTwitch events are generated in response to twitch stream interaction.
TwitchEventTypeEnumEnumerates the types of twitch events that scripts can subscribe to.
UIClassManages the client UI.
UIMenuClassManages a clickable on-screen menu UI element.
UIProgressBarClassManages a progress bar UI element.
UIScoreBoardClassManages a score board HUD element.
UserClassThe User class handles interactions user logins and logoffs.
User.SubscriptionHandlerDelegateSubscribe to receive events when users enter or leave the experience, or change their chat name.
UserDataClassSubscribe to receive events when users enter or leave the experience.

Generated from the Sansar 47.10.0 client ScriptApi snapshot.