# Sansar Docs: Complete documentation
> Every page of Sansar Docs
# Sansar Docs
> Learn to explore worlds, build your own and sell what you make in Sansar.
The Sansar docs cover the Sansar client and sansar.com: exploring worlds, building and scripting your own, the Store and Sansar Dollars, and getting help. See the [Script API reference](/scripting/api) and the [patch notes](/patch-notes) for what changed in each release.
Source: https://docs.sansar.com/
---
# Get started
> Install Sansar, check that your PC can run it, and take your first steps in a world.
- [Installing Sansar](/get-started/install)
- [Quick Start: Exploring in Sansar](/get-started/quick-start)
- [System Requirements](/get-started/system-requirements)
- [Sansar Compatibility FAQ](/get-started/compatibility-faq)
- [Sansar on Mac](/get-started/running-sansar-on-mac)
- [Configuring Firewalls](/get-started/configuring-firewalls)
## See also
- [Create your Sansar account](/account/create-account)
- [Using sansar.com](/help/using-sansar-com)
Source: https://docs.sansar.com/get-started
---
# Installing Sansar
System Requirements
For a list of recommended and minimum system specifications for people using desktop only or desktop with VR headsets, please see [System requirements](/get-started/system-requirements.md).
Install Sansar
To install Sansar:
1. Download the client from the [Sansar Download page](https://www.sansar.com/download).
2. Locate the file in your browser's download folder.
3. Double click **SansarInstaller.exe** to start the installer.
4. Agree to install the program.
5. The Sansar Installer appears. Click **Next** to begin the installation process.
6. Review the License Agreement, select the box to **Accept**, and click **Next**.
7. You may choose an alternate install location for Sansar, and choose to add shortcuts to the desktop and startup menu.
8. Click **Install** to install Sansar.
9. Click **Launch** to run the Sansar Updater.
10. The Updater installs the latest version of Sansar and launches the program.
**Note:** Sansar is also available for download on the Steam platform. For information about how to install Sansar with Steam, see [Steam integration](/account/steam-integration.md)
Upgrading Sansar
It is not necessary to uninstall Sansar to install the latest version. The Sansar Updater automatically checks for and installs the newest version of Sansar.
Uninstall Sansar
To uninstall Sansar:
1. Access the Windows control panel.
2. On the control panel, select **Uninstall a program** under Programs.
3. Choose Sansar from the list of programs.
4. Click **Uninstall**. This opens the Sansar Installer.
5. Follow the prompts on the Sansar Installer to uninstall Sansar.
Source: https://docs.sansar.com/get-started/install
---
# Quick Start: Exploring in Sansar
After you have [installed Sansar](/get-started/install.md), chosen an [Avatar Name and Avatar ID](/account/avatar-name-id.md) and customized your avatar, you may wish to explore some of the worlds created by the Sansar community.
## Finding worlds
The Prime Portal Panel Walking and running are the simplest ways to get around in a world. An avatar using the targeting beam to select a teleport destination and facing. An avatar holding a dynamic object. Click the Copy URL button to copy a world's URL to your computer's clipboard. You can then paste the link in an email, web page, or chat message.
In desktop mode, the main menu can be found on the right hand side of the screen while visiting a world or editing a scene.
In VR, the main menu appears on your left wrist when you press Y or the left Menu button, depending upon your VR controller setup
Approach the Prime Portal and interact with one of its curved pillars to open the Prime Portal panel.
The Prime Portal panel provides access to all the discoverable worlds in Sansar, as well as upcoming events.
To visit a world listed in the Prime Portal panel, move your mouse cursor over the world's thumbnail and click Visit.
To view more information about a world listed in the Prime Portal panel, click the world's thumbnail to open its profile.
Approach a dormant Core Portal to activate it.
Interact with the portal using your mouse cursor or VR controller
A table and chairs near the entrance.
Semi-enclosed meeting areas can be found around the edges
The quest giver terminal, with holograms of Agent Animus and Agent Forma. Click one of them to receive a quest.
After interacting with a quest giver, review the quest information and rewards and then click Start the quest to add the quest to your Quests panel and begin tracking your objectives. You may click Maybe later to decline the quest.
Showing all quests. Progress on each quest is indicated by the bars underneath the thumbnail images. Click Continue quest to view quest details.
Quest details. Shows progress on all quest objectives, as well as the quest reward. Click Quests in progress to return to the list of all quests.
To chat with all nearby people in your experience:
To send or reply to a private message:
Everyone's level and title are visible in their user profile, just under their name.
To view someone's total XP and the distribution of someone's traits, hover your mouse cursor over the Level in their user profile.
The Popular now icon shows that other people are visiting a world.
See a list of upcoming events in the Codex, under the Events tabs.
Search for friends using the Search tab of the People panel.
The People app allows you to send a private Message, Add Friend, or Mute any avatar in your current scene.
Move your mouse cursor over an avatar to see that person's Avatar Name and Avatar ID. Click to access Mute and Add/Remove Friend buttons.
When looking at an avatar in VR and holding a grip button, their Avatar Name and Avatar ID appear. Click Add Friend to add this person as your friend, or Mute to silence all voice and text chat from this person.
An avatar typing in text chat, with the typing indicator overhead
An avatar speaking in voice chat, with the voice indicator overhead
A broadcasted avatar with the broadcasting indicator overhead
Nearby - This tab lists all nearby people in your current experience. For each person on the list, you may click their name and choose to Message them to send a private message as described above, or you may Add Friend to request a mutual friendship. The other person must first accept your Friend request before they appear on your Friends list. You can also Send Gift to send them Sansar dollars. Additionally, you may choose to open that person's user profile, which contains additional muting, friendship, and reporting controls.
Note: There is no Nearby tab in edit mode.
Friends - This displays a list of your Friends, regardless of whether they are online or in your current experience. For each person on the list, you may click their name to either Message them, Send Gift to send them Sansar dollars, or open their user profile, which contains friendship and communication options.
Requests - Shows a list of currently pending Friend requests you have received from other people. For each pending request, you may click the person's name and then press Accept to accept the request.
Search - Enter part or all of someone's Avatar Name or ID and press the Search button to return a list of matching results. You may click the resulting name to reveal options to Message, Friend, Send Gift, or open the Profile of that person (which includes messaging, friendship, muting, and reporting options).
| [Image: People panel Search tab listing matching people, each with message, add friend, and send gift icons] | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | Source: https://docs.sansar.com/explore/social/people-panel --- # User profiles ## User profiles In the Sansar client, everyone has a _user profile_, a one-page overview of their Sansar identity that includes their [avatar name and ID](/account/avatar-name-id), a brief autobiography, a link to their [Sansar Store](/store), and links to their listed worlds. You can also use someone's profile in Sansar to add them as a friend, send them a message, or report them for inappropriate behavior or content. ## Viewing a profile in Sansar To view someone's profile in Sansar: 1. Select **Socialize > Friends & people** from the main menu to open the People panel. 2. On any tab of the People panel, click someone's name to open their profile in a new panel.Click someone's name in the People panel to open their profile in a new panel.
Viewing a profile.
Click the Creations tab to see the worlds, Store listings, and snapshots this person has created.
Click Socialize > Edit my profile to begin editing your profile.
Editing a user profile.
Socialize > Take a photo
Adjusting the capture area by dragging the corners and edges.
Select For the Codex to capture images at the correct aspect ratio for the Codex.
Mouselook Mode reticle in 3rd person
| VR height settings. |
The Avatar type tab
Scale on the options tab
The Hairstyles tab. The active hairstyle is highlighted with a green outline.
The face tab
Click and drag the highlighted area to modify it.
The Clothing tab. Worn clothing is highlighted with a green outline.
The Accessories tab.
The Animation tab.
The Worn Items panel.
New appearance items are marked with the word New in the corner of the thumbnail. A numbered badge indicates the number of new items in each tab of the appearance editor.
An avatar performing the /clap emote.
Access the Emotes menu by choosing Socialize > Emotes from the main menu or by pressing Ctrl + E while in an experience. Click an emote in the list to make your avatar perform the animation. To dismiss the Emotes menu, click the X in the center of the menu.
Marvelous Designer clothing is marked with an "M" logo.
Click the triangular Play button next to a clothing item to adjust that item, or click Adjust Clothing to adjust all Marvelous Designer clothing on your avatar.
Click and drag while in adjust mode to adjust a garment's fit and position. For example, this hood was pulled over the avatar's head.
Drag the zipper tab up or down to zip or unzip zippered clothing.
Note: At this time, there is no visual indicator for active pins. Clothing simply "sticks" at the pinned location and does not pull with the rest of the clothing.
Click on the transform item button to move, rotate or resize a clothing item.
Click the Translate button on the worn items panel to expose the translation gizmo.
Click the rotate button on the worn items panel to expose the rotation gizmo.
Click the scale button on the worn items panel to expose the scale gizmo.
Click the All transformations button on the worn items panel to expose the full gizmo.
Selecting an accessory to attach to your avatar.
Choose Style My Avatar from the Create menu.
While editing a look, click Import on the appropriate tab to begin the process of importing a clothing object.
Make sure you are on the right item tab before uploading your item.
.fbx, .obj (rigged mesh)
.samd (Marvelous Designer)
| 8,000 | N/A, see AABB constraints | Yes, if selling the item in the store |From the center point:
0.9 meters left and right, front and back
2.2 meters above the avatar feet
.05 meters below the avatar feet (to account for shoes).
| | Clothing |.fbx, .obj (rigged mesh)
.samd (Marvelous Designer)
| 8,000 | N/A, see AABB constraints | Yes, if selling the item in the store |From the center point:
0.9 meters left and right, front and back
2.2 meters above the avatar feet
.05 meters below the avatar feet (to account for shoes).
| | Accessory | .fbx, .obj (rigged mesh) | 5,000 | N/A, see AABB constraints | Yes, if selling the item in the store |From the center point:
0.9 meters left and right, front and back
2.2 meters above the avatar feet
.05 meters below the avatar feet (to account for shoes).
| | Animation | .fbx | N/A | N/A, see AABB constraints | Yes, if selling the item in the store |From the center point:
2 meters to the left, right, front and back of the avatar
4 meters above the avatar feet
.1 meters below the avatar feet
| | Avatar | .fbx, .obj | 40,000 | | Yes, if selling the item in the store |From the center point:
0.9 meters left and right, front and back
2.2 meters above the avatar feet
.05 meters below the avatar feet (to account for shoes).
|Modeling a wristwatch relative to the female reference avatar model.
Accessory slots within the avatar editor
This shows the general area an accessory will follow when the avatar moves
Notice the origin point is at world zero and the transforms are uniform and applied
Material slots will correspond in game
File > Export > .FBX or .OBJ
Select the corresponding type to your intended upload this affects what the item is connected with in game.
Errors will appear here if the item fails
As of 2023 the AABB was expanded
| File Names | Description |
|---|---|
| AABB v2.fbxAABB v2.blend | AABB Reference Files Containing: Minimum Avatar AABB Maximum Avatar AABB Animation Cube AABB |
| AABB v1.fbx | Pre Aug 2023 AABB (outdated) |
| Files | Description |
|---|---|
| Av2_High_Female.fbxAv2_High_Male.fbxav2_full_male.blendav2_full_female.blend | The full resolution skeleton is the core skeleton that drives avatars in Sansar. The mid and low resolution avatars are created against this version. We recommend using this skeleton for best results with body and facial animation deformation. Due to it's more complex state, it is more complicated to skin against compared to the mid and lower resolution skeletons. The high poly mesh included is only meant to provide a high quality starting point for skinning transfers to other meshes. The high poly mesh is not intended to be used for uploading into Sansar due to it's triangle count and will require decimation to import. Details:
|
The full resolution skeleton.
| Files | Description |
|---|---|
| Av2_Mid_Female.fbxAv2_Mid_Male.fbxav2_mid_female.blendav2_mid_male.blend | The mid resolution skeleton simplifies the skinning work by removing some of the non-critical joints. Most of the joints that were removed are from the face. As a result, if you are creating an avatar, we recommend using this skeleton if your avatar isn't expected to have detailed facial animations. Details:
|
| Files | Description |
|---|---|
| Av2_Low_Female.fbxAv2_Low_Male.fbxav2_low_female.blendav2_low_male.blend | The most basic of skeletons. We recommend using this for simple avatars that doesn't need complex facial or body skinning. This is also the only skeleton that is Mixamo compatible. If you would like to use Mixamo animations on the other skeletons, you will first have to grab the animation with this low resolution skeleton and then retarget to the other skeletons using your 3D application of choice. For more information, see Using our animation skeleton to create custom animations. Details:
|
A side by side comparison of the skeletons.
Select the model and switch to Edit Mode.
While the model is selected and in Edit Mode, select Mesh > Clean up > Decimate Geometry.
Set Ratio to the fraction of triangles to keep. In this example, 0.620 keeps about 62% of the triangles, removing about 38%.
Non-default settings:
Non-default settings:
Non-default settings:
Non-default settings:
Central body joints
Left arm joints
Right arm joints
Left leg joints
Right leg joints
Left finger joints
Right finger joints
Jaw Area Joints
Chin Area Joints
Mouth Area Joints
Nose Area Joints
Left Eye Area Joints
Right Eye Area Joints
Forehead Area Joints
Between Eyebrow Area Joints
Left Eyebrow Area Joints
Right Eyebrow Area Joints
Left Cheek Area Joints
Right Cheek Area Joints
Ears
Tongue
Chest Joints
Toe Joints
Attach Joints
Accessories would be a good use of ATTACH joints. Example: Hook up a halo to the "head_ATTACH" joint. Then during a custom emote animation, spin the halo around.
In the future these ATTACH joints will be even more useful when all animations for the characters can be overwritten.
| ## Support joints These support joints are only used to support the animation of the body and face joints. They do not need to be hooked up to any meshes since it is their child or related joints that should be getting all the skinning data. **Face Support Joints** * L\_eyelid\_top * L\_eyelid\_bottom * R\_eyelid\_top * R\_eyelid\_bottom ## Other joints These joints are for other purposes outside of core animation and shouldn't need to have any meshes skinned to them. * Locomotion\_Vector * root * L\_grip * R\_grip * camera\_ATTACH ## Skinning details ## Skin bind settings * 4 Max Influence * Linear Skinning Method ## Skinning examples **Auto-twist Arms:** One thing to keep in mind is that when the skeleton gets imported or referenced into a 3D app, the auto-twist joints are not hooked up in a way that will look correct. But if the skinning on those joints looks similar to the examples, then they will import into the engine and look good during in-game animations. *** **Pelvis/Thigh Area:** What makes the pelvis and thigh area a little more complex is the glute\_twist1 bone that helps with maintaining volume as the legs are rotating back and forth. That particular bone should only cover a small specific area. Like the arms, the thighs also have an auto-twist that will help maintain a smoother look as the legs are twisting. Unlike, the arms, the thighs only require 1 twist bone. Also like the arms, the thigh auto-twist and glute\_twist1 is not hooked up during import into a 3D app. So they will not look correct until imported into the engine. *** **Elbow and Knee:** These support joints are solely for the purpose of helping the knee and elbow maintain better volume as the lower legs and forearms are bending. These are also not hooked up during import into a 3D app and will require import into the engine before results can be seen. Source: https://docs.sansar.com/avatars/resources/sansar-skeleton-skinning-details --- # Using Animation Skeleton > Using the animation Skeleton Interface ## Using the animation skeleton to create custom animations We provide a simplified, "lower resolution" _animation skeleton_ that is suitable for creating animations and uploading them to Sansar for your avatar to use. This skeleton is different from our main avatar skeleton and is suitable for creating custom animations but cannot be used to create avatars. **Note:** Sansar is able to interpret the animation skeleton for the purposes of importing animations, but any avatars that attempt to use this simplified skeleton are rejected during the import process. ## Getting the animation skeleton files The animation skeleton files can be found in article [Avatar reference files](/avatars/resources/avatar-reference-files.md). ## Customizing animations in Mixamo Mixamo is a web-based animation customizer that allows you to upload a custom character and customize animations from a large library of stock animations: 1. Go to [https://www.mixamo.com](https://www.mixamo.com/#/) and log in with your account. 2. Once you are logged in, click **Upload Character** at the top right. 3. In the Upload A Character window that opens, drag and drop any of the low resolution skeleton files into it. These files can be found in [Avatar reference files](/avatars/resources/avatar-reference-files.md). 4. Once the skeleton has successfully uploaded, a preview appears. Click **Next** to confirm the upload. 5. Select any animation to see it loaded up on our rig and skeleton for you to preview and tweak. 6. Click the **Download** button to download a .fbx file containing this animation on our skeleton. Be sure to use these settings for your download: * **Format** - FBX(.fbx) * **Skin** - With Skin * **Frames per Second** - 30 * **Keyframe Reduction** - nonePreviewing a dance animation on Sansar's simplified animation skeleton.
The All events tab of the Codex. Click Interested on an event to add it to your calendar.
The Create Event panel. Fill in the required information about your event and click Save & Publish to publish your event to the Upcoming events calendar.
Broadcasted avatars are marked with the word Broadcasting in their nametag.
Broadcasted avatars also have a circular icon above their heads for quick identification
New wearables show New on the thumbnail. A numbered badge shows how many new wearables are on each tab of the appearance editor.
Open the Sansar Store inside Sansar using the Store panel.
After buying an avatar-related item, select Wear it now to open the avatar editor and wear it right away.
On the Store listing for an item you purchased, Redeliver replaces Buy or Get.
Select Sell item.
Select Create Listing.
Once the item is listed, you can edit it on your Manage Listings page.
Select Create Listing.
Once the item is listed, you can edit it on your Manage Listings page.
Select Replace store item in the scene editor.
Enter the item number or listing page URL and select Continue.
A confirmation window appears when the item updates. Select Yes, edit listing to edit the listing in your web browser.
Find Scene Script Library in your purchased scripts. No purchase is necessary; it is included by default.
In the second dropdown menu under Scene Script Library, choose Store Listing.
Enter the URL or product ID of a listing from the Sansar Store in the Product ID or URL field. Take note of the value in the -> Show Listing field for use in the next section.
In the second Scene Script Library, make sure the second dropdown menu is set to Interaction. Then, copy the value from -> Show Listing in Store Listing into the field for On 1st Click ->. This is how the two scripts will know to communicate with each other.
When a visitor clicks the interactive object a limited Sansar Store panel appears, allowing them to immediately purchase the item designated by the Store Listing script
Right-click the item in your inventory and choose Buyer's permissions.
Check the box next to either Full Permissions or Property Changes Only.
The item in this example contains a sound, collision volume, and script component. If the item is sold in the store, buyers will be able to edit the properties whose boxes are checked but they cannot otherwise change the item.
Select List this item and make it hidden in the Sansar Store. when editing the listing, then select Save Changes.
Click Send gift to open the Gift panel and initiate the transfer.
Use the -10, -1, +1, and +10 buttons to adjust the amount of the gift before sending.
The Sansar login screen.
The Atlas. Click Create to open the My Experiences app.
Click Create in the My Experiences app to begin creating a new experience.
Selecting starting content for the experience.
Click the Edit Scene icon button to begin editing your experience's scene.
Your newly uploaded object should be the first item in the Inventory tab of the Inventory panel.
The Build button.
Visiting a scene with an interesting object.
While in edit mode, you can publish the experience to the Atlas by clicking Publish to Atlas. For more information on publishing an experience, see Publishing an experience to the Atlas.
Click Create to create a new world.
The Choose starting content dropdown includes your own created scene templates in addition to the Sansar default scene templates.
You can drag and drop quest objectives to re-order them on the Objectives tab.
Parameters of the Quest Giver Interaction script in the Quest Script Library. Select your quest from the dropdown under the Quest parameter.
Parameters of the Quest Objective Interaction script in the Quest Script Library. Select your quest from the first dropdown under Objective, then, in the second dropdown, select the objective to be completed.
When the quest giver offers you a quest click Start the quest to accept.
When you complete the quest, click Complete Quest to confirm the quest's completion.
Click Reset Quest on the Objectives tab of the Quest Creator panel to reset your current progress on the quest.
My Worlds Panel
The scene editor
When editing a scene, the toolbar gives you the option to Save, Build and Publish.
The Object stats toolbar can be viewed while editing a scene.
Click Generate report to save a CSV report of statistics for all objects in the current scene.
Select multiple objects by holding Ctrl, then right-click one of them and choose Group into new parent.
Make sure to give your new parent object a meaningful name. The selected child objects are grouped under the parent object and indented for easy identification.
The inventory panel.
The Inventory contains all of your purchased and uploaded items, as well as, several basic items and system objects.
Filter by type.
Sort your items.
The action buttons.
You can toggle the Scene Objects list on and off by clicking Scene objects under Tools.
Click the Show/Hide icon to toggle an object's visibility in the scene.
Click the Enable/Disable object selection icon to toggle an object's selectability.
The AABB and Animation Cube
| File Name | Description |
|---|---|
| AABB v2.fbx AABB v2.blend | Experimental AABB's |
| AABB v1.fbx | Outdated AABB's Pre 2023 |
Maximum Bounding Box
Minimum Bounding Box
Animation Bounding Box
Experimental AABB expansion
.fbx, .obj (rigged mesh)
.samd (Marvelous Designer)
| 12,000 | | Clothing |.fbx, .obj (rigged mesh)
.samd (Marvelous Designer)
| 8,000 | | Accessory | .fbx, .obj (rigged mesh) | 5,000 | | Emote Animation | .fbx | 30seconds | | Avatar | .fbx, .obj | 40,000 | Source: https://docs.sansar.com/create/import/aabb-bounding-box-and-item-restrictions --- # Importing World Items Importing items into your World Build Inventory in Sansar is done by using the Import menu in the toolbar at the top of the screen. ## Selling These Asset Types To sell asset types that use this importer, follow these guides: * [Selling Mesh Objects](/store/selling/manage-listings.md) * [Selling Collaborative Assets](/store/selling/manage-listings.md) * [Selling Multiple Objects](/store/selling/manage-listings.md) ### Importing items to Sansar The following instructions apply to all content types: 1. To start importing an item into Sansar, first enter edit mode by clicking the **Edit scene** button on any of your projects under the My Experiences App. 2. Once your scene loads, look at the toolbar at the top of the screen. Click **Import**, then select a content type from the menu. This opens an Import panel for that specific content type. 3. In the Import panel, click **Browse**. 4. Once the browse panel is open, select the file from your drive. For information on what file types Sansar supports, see [supported file types](/create/import/supported-file-types.md) below. * (Optional) If you are uploading a 3D model, we encourage you to add a [collision mesh](/create/import/importing-collision-volumes.md) to make your objects dynamic in the Scene. Click **Browse** under **Optional collision/physics mesh** to add a .fbx or .obj file and to use it as the object's collision volume. * If your object has a collision mesh, you may choose a starting **Motion type** for the object. For more information on motion types, see [Object motion types](/create/world-editor/object-motion-types.md). * For 3D models, you may click **Materials Settings** to change the object's shaders and textures at this time. See [Materials editing and shaders](/create/materials/materials-editing-and-shaders.md) for additional information. 5. Under the **Item name in Inventory**, enter an appropriate name for the item. Keep in mind that this name can not be changed once the item has been uploaded in Sansar. **Note:** If you are a seller who plans to sell items in the Sansar Store, make sure to think about the name of your item carefully. The Item Name is the name that appears in the buyer's inventory once they have purchased the item. 6. Once you are ready to upload your item to Sansar, press **Upload**. 7. A status panel appears as your item uploads into Sansar. Press **Close** on the status panel once this upload process is complete. 8. Once your file is uploaded, you can find it in the Inventory panel under the **All** or **Created** tab. Source: https://docs.sansar.com/create/import/importing-world-items --- # Importing Collision Volumes This page covers importing of collision volumes see [Collision Volumes](/create/world-editor/collision-volumes.md) for info on what they are and do. Collision volumes are currently only editable on world items and not avatars or avatar based objects. ## Adding a collision mesh on import When importing your item a second field is available for your collision mesh file we highly suggest you do not use your Render mesh file as your collision. if you wish to set the [Motion type](/create/world-editor/object-motion-types.md) you are required to have a collision volume. You can add a system volume later but it is limited to a 'Cube' and 'Sphere'.Skybox strip orientation order from left to right: +X, -X, +Y, -Y, +Z, -Z.
.
The left menu is the material slots and the dropdown on the top right is where you select what shader you want to use
Property Name: **Sansar_MaterialType** | Display Name | System Name | |--------------------------------------------------------|------------------------------------------------------| | Standard | OpaqueSingleLayer | | Standard + Environment | OpaqueEnvironmentSingleLayer | | Standard Two Sided | TwoSidedOpaqueSingleLayer | | Standard + Alpha Mask | OpaqueMaskSingleLayer | | Standard + Environment + Alpha Mask | OpaqueEnvironmentMaskSingleLayer | | Standard Two Sided + Alpha Mask | TwoSidedOpaqueMaskSingleLayer | | Standard + Emissive | OpaqueEmissiveSingleLayer | | Standard Two Sided + Emissive | TwoSidedOpaqueEmissiveSingleLayer | | Billboard | Billboard | | Standard + Detail | OpaqueSingleLayerDetail | | Standard Two Sided + Detail | TwoSidedOpaqueSingleLayerDetail | | Standard + Detail + Alpha Mask | OpaqueMaskSingleLayerDetail | | Standard Two Sided + Detail + Alpha Mask | TwoSidedOpaqueMaskSingleLayerDetail | | Subsurface + Detail | OpaqueSubsurfaceSingleLayerDetail | | Subsurface + Detail + Alpha Mask | OpaqueMaskSubsurfaceSingleLayerDetail | | Standard + Detail + Emissive | OpaqueEmissiveSingleLayerDetail | | Standard Two Sided + Detail + Emissive | TwoSidedOpaqueEmissiveSingleLayerDetail | | Four Layer Non-Specular | OpaqueDiffuseMultiLayer | | Standard Three Layer + Detail | OpaqueTripleLayerDetail | | Emissive + UV Animation | Emissive | | Emissive Two Sided + UV Animation | TwoSidedEmissive | | Transmissive + Emissive | TransmissiveEmissive | | Standard + Emissive + Stereographic | StereographicOpaqueEmissiveSingleLayer | | Standard + UV Animation | ScrollingOpaqueSingleLayer | | Standard Two Sided + UV Animation | TwoSidedScrollingOpaqueSingleLayer | | Standard + Emissive + UV Animation | ScrollingOpaqueEmissiveSingleLayer | | Standard Two Sided + Emissive + UV Animation | TwoSidedScrollingOpaqueEmissiveSingleLayer | | Standard + Alpha Mask + UV Animation | ScrollingOpaqueMaskSingleLayer | | Standard Two Sided + Alpha Mask + UV Animation | TwoSidedScrollingOpaqueMaskSingleLayer | | Index: Standard + UV Animation | IndexScrollingOpaqueSingleLayer | | Index: Standard Two Sided + UV Animation | TwoSidedIndexScrollingOpaqueSingleLayer | | Media: Media Surface | VideoScreen | | Media: Media Surface + Stereographic | StereographicVideoScreen | | Media: Media Surface + ChromaKey | ChromaKeyVideoScreen | | Media: Displacement Media + UV Animation | MediaScrollingOpaqueEmissiveSingleLayer | | Media: Two Sided Displacement Media + UV Animation | TwoSidedMediaScrollingOpaqueEmissiveSingleLayer | | Transparent | Transparent | | Transparent + Multibump | TransparentMultibump | | Diffractive: Transparent + Multibump | TransparentMultibumpDiffract | | Diffractive: Transparent + Multibump + Environment | TransparentMultibumpEnvironmentDiffract | | Diffractive: Standard + Alpha Mask | OpaqueDiffractionMaskSingleLayer | | Diffractive: Standard Two Sided + Alpha Mask | TwoSidedOpaqueDiffractionMaskSingleLayer | | Diffractive: Standard + Alpha Mask + UV Animation | ScrollingOpaqueDiffractionMaskSingleLayer | | Diffractive: Standard Two Sided + Alpha Mask + UV Animation | TwoSidedScrollingOpaqueDiffractionMaskSingleLayer | | Fresnel: Standard + Emissive | OpaqueEmissiveFresnelSingleLayer | | Fresnel: Standard Two Sided + Emissive | TwoSidedOpaqueEmissiveFresnelSingleLayer | | Pixelize: Billboard | BillboardPixelize | | Pixelize: Billboard + Alpha Mask + UV Animation | ScrollingOpaqueMaskPixelSingleLayer | | Pixelize: Standard + Emissive | OpaqueEmissivePixelizeSingleLayer | | Pixelize: Standard Two Sided + Emissive | TwoSidedOpaqueEmissivePixelizeSingleLayer | | Pixelize: Standard + Alpha Mask | OpaquePixelizeMaskSingleLayer | | Pixelize: Standard Two Sided + Alpha Mask | TwoSidedOpaquePixelizeMaskSingleLayer | | Pixelize: Standard + Emissive + UV Animation | ScrollingOpaqueEmissivePixelizeSingleLayer | | Pixelize: Standard Two Sided + Emissive + UV Animation | TwoSidedScrollingOpaqueEmissivePixelizeSingleLayer | | Screenspace: Standard + Emissive | ScreenspaceOpaqueEmissiveSingleLayer | | Screenspace: Two Sided Standard + Emissive | TwoSidedScreenspaceOpaqueEmissiveSingleLayer | | Screenspace: Standard + Emissive + UV Animation | ScrollingScreenspaceOpaqueEmissiveSingleLayer | | Screenspace: Standard Two Sided + Emissive + UV Animation | TwoSidedScrollingScreenspaceOpaqueEmissiveSingleLayer | | No Shadow: Standard | OpaqueSingleLayerNoShadow | | No Shadow: Standard + Emissive | OpaqueEmissiveSingleLayerNoShadow | | No Shadow: Standard + Alpha Mask | OpaqueMaskSingleLayerNoShadow | | No Shadow: Standard Two Sided + Alpha Mask | TwoSidedOpaqueMaskSingleLayerNoShadow | | Audio Reactive: Emissive + UV Animation | AudioEmissive | | VAT: Standard | OpaqueVATSingleLayer | | VAT: Standard + Alpha Mask | OpaqueMaskVATSingleLayer | | VAT: Standard + Emissive | OpaqueEmissiveVATSingleLayer |
Local Object Space
UV Tangent Space
Files contained in the following folder
Displacement Map and Factor slots
Local Space
UV Tangent Space
Additional settings and options
All three types of lights interacting with an object in the scene.
A directional light, represented by three arrows pointing in the direction the light shines.
A point light emitting light in all directions, represented by a sphere.
An avatar watching a YouTube video on a media surface.
Media Surface Settings in the Scene Settings panel.
Web audio streams in the Scene Settings panel.
Use Audio/Video preview to play your scene's media and sounds while editing the scene.
Clothing marked with Marvelous Designer's "M" logo in the Lookbook clothing inventory.
Two images of the same avatar wearing the same Marvelous Designer clothes before and after adjustment in the avatar editor using adjust mode. Note the sleeves, pant legs, and collar.
Export Sansar clothing from Marvelous Designer by choosing File > Export > Sansar (SAMD).
The Script Console.
The trigger volume is between the two visible objects in such a way that visitors must pass through the trigger volume when walking between the two crates.
When entering the invisible trigger volume, triggerannounce.cs announces your entry in the Chat app.
The Properties panel for a trigger volume.
Selecting the VolumeType from the properties of the trigger volume's Volume component.
Sets a delay on throwing the cannonball. The number entered represents the number of seconds between each throw.
Note: If a user repeatedly presses the throw button, the number of throws accumulate and will fire in succession while still considering the delay time.
| | Fire Sound | Assigns a sound to play when the cannon is fired. | | Hit Sound | Assigns a sound to play when the cannon hits a target. | | Loudness | Sets the loudness of the _Fire Sound_ and _Hit Sound_ when played. | | Spawn Point 1 |Sets teleport points. If Spawn Point values are entered, the targets that are hit randomly teleport to the designated spawn points.
Currently, you must set position points on all four points. By default, the position points <X,Y,Z> is set to <0,0,0>. Leaving <0,0,0> as a position point for any spawn point may teleport the target to <0,0,0>. You may enter the same position point values across all spawn points if you don't want the target to teleport to the <0,0,0> position point.
| | Spawn Point 2 | | | Spawn Point 3 | | | Spawn Point 4 | | Script controls Use the following buttons to trigger the cannonball: | **Controller** | **Button** | | ------------------------ | --------------- | | Keyboard | _**F**_ key | | Oculus touch controllers | _**X**_ button | | Vive wand | N/A | | Xbox controller | _**A**_ button | Source: https://docs.sansar.com/scripting/examples/cannonball --- # Follow The Path > Example Script: Follow The Path The example script, _Follow the Path_ (_FollowThePath.cs_), which moves a dynamic object along a route of waypoints in a loop. Grab it at the download link at the end of the page. Here is a step-by-step guide to using the script: 1. Download the script file from the download link at the end of this article. 2. Follow the instructions provided in [Working with scripts](/scripting.md#guides) to upload the script and add it to an object. 3. Open the object's Properties panel and go to the Script Settings section. 4. On the properties panel, set **IsDynamic** to **On**. 5. At the bottom of the object's properties panel is a Script Settings section. Upon looking at the **Script Settings** section for _FollowThePath_, you will see a list of parameters which you can set for the object. Setting values on these parameters can help you set the movement of your object. 6. Once you have finished setting the parameters for your object, your script is ready! Save and build your scene. 7. If you want to verify that the script is running correctly, visit the scene once it has been built. Script parameters | Speed | _Speed_ allows you to set the speed of an object. It is best to set the _Speed_ value between 5 to 25. | | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | Position 1 |Position points help define the route of your object along an intended path.
The object's starting position is always at the point at which the object was placed. In total, you may add up to 7 position points for each object by filling the <x,y,z> points with values. However, you may also choose to have fewer position points.
By default, <0,0,0> is set as the <x,y,z> position point for all position points. When <0,0,0> is set, no position point is assigned to that slot.
| | Position 2 | | | Position 3 | | | Position 4 | | | Position 5 | | | Position 6 | | | Position 7 | | | Loop | If _Loop_ is set to **ON**, the objects will move and follow the route of points repeatedly. If _Loop_ is set to **OFF**, the object will warp to the start point after it reaches the end of the defined position points. | | On Collide TP Dest | _On Collide TP Dest_ allows you to set a teleport function. If set, an avatar will be teleported to the defined position point when the object comes into contact with it. | Source: https://docs.sansar.com/scripting/examples/follow-the-path --- # Random Movement > Example Script: Random Movement The example script, _Random Movement_ (_RandomMovement.cs)_, randomly moves a dynamic object around its starting position. Grab it from the download link at the end of this article. Instructions Here is a step-by-step guide to using the script: 1. Download the script file from the download link at the end of this article. 2. Follow the instructions provided in [Working with scripts](/scripting.md#guides) to upload the script and add it to an object. 3. Open the object's Properties panel and go to the Script Settings section. 4. On the properties panel, set **IsDynamic** to **On**. 5. At the bottom of the object's properties panel is a Script Settings section. Upon looking at the Script Settings section for the _Random Movement_ script, you will see a list of parameters which you can set for the object. Setting values for these parameters can help you set your object's behavior. 6. Once you have finished setting the parameters for your object, your script is ready! Save and build your scene. 7. If you want to verify that the script is running correctly, visit your scene once it has finished building. Script parameters |  | | ------------------------------------------------------------------------------------------------------------------------------ | | The parameters for Random Movement. | | Speed |Speed allows you to set the speed of an object. The higher the value, the faster the object moves.
However, keep in mind that the speed is affected by the mass of the object. Make sure that the speed of your object is proportional to its mass.
| | ----- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Chaos | _Chaos_ affects how the object changes course when it is hit. The _Chaos_ value should be set between 0.0 and 1.0. The higher it is, the more the object will change course. | | Range | _Range_ determines how far an object will go from their starting position before it goes back to that starting point. _Range_ can be set at any value. | Source: https://docs.sansar.com/scripting/examples/random-movement --- # Reflective Detector > Example Script: Reflective Detector and Tracker The example script, _Reflective Detector_ (_ReflectiveDetectorExample.cs_), allows you to detect when an avatar collides with an object that contains the script. It sends data to the _Reflective Tracker_ (_ReflectiveTrackerExample.cs_), which then tracks the number of hits. You may add as many detectors as you want to objects in your scene. However, the script does not track collisions individually per detector. Instead, all detectors track hits on a scene-wide basis and tracks all collisions towards one tally. Here is a step-by-step guide to using the script: 1. Download the script files from the download link at the end of this article. 2. Follow the instructions provided in [Working with scripts](/scripting.md#guides) to upload the scripts to your inventory. 3. Simply drag the scripts to the scene and attach each script to an object. Remember, you may add as many detectors as you wish. 4. There are no parameters for these scripts, so once you finish adding the scripts to your scene, save and build your scene. 5. To test the script, visit the scene once it has been built. **Note:** These files are also available in the client folder: Program Files > Sansar > Client > Script API > Examples Source: https://docs.sansar.com/scripting/examples/reflective-detector --- # Simple Script > Example Script: Simple Script **Simplescript** is a new base class that offers an easy start to simple script writing. The example script, _Simple Script_ (_SimpleScriptExample.cs_), is a more complex script example utilizing this new base class. This script shows how you can use the new script base. The example itself does not have any editable properties when added to a scene in Sansar. However, when added to a scene and attach it to an object, you will be able to get the following : * Users who enter the experience get a welcome message. * Logs when people leave the experience. * Resets its position 5 times a second if the object is dynamic. * Logs when anyone bumps into the object. * Logs when any other script sends it a message. Here is a step-by-step guide to using the script: 1. Download the script files from the download link at the end of this article. 2. Follow the instructions provided in [Working with scripts](/scripting.md#guides) to upload the scripts to your inventory. 3. Drag the scripts to the scene and attach each script to an object. Remember, you may add as many detectors as you wish. 4. There are no parameters for these scripts, so once you finish adding the scripts to your scene, save and build your scene. 5. To test the script, visit the scene once it has been built. **Note:** These files are also available in the client folder: Program Files > Sansar > Client > Script API > Examples Source: https://docs.sansar.com/scripting/examples/simple-script --- # Sound Randomizer > Example Script: Sound Randomizer The example script, \_Sound Randomizer (\__SoundRandomizer.cs),_ plays randomly from a list of sounds at randomized intervals. You can get the file from the download link at the end of this article. Instructions Here is a step-by-step guide to using the script: 1. Download the script file from the download link at the end of this article. 2. Follow the instructions provided in [Working with scripts](/scripting.md#guides) to upload the script and add it to an object. 3. Open the object's Properties panel and go to the Script Settings section. 4. Look at the Script Settings section on the Properties panel. Make sure that the script dropdown menu is set to the _SoundRandomizer_ example script. If the script is set correctly, a set of editable parameters appears. See below for a short guide on each parameter. 5. Once you have finished setting the parameters for your object, your script is ready! Save and build your scene. 6. If you want to verify that the script is running correctly, visit the scene once it is built. Script parameters |  | | ------------------------------------------------------------------------------------------------------------------ | | Parameters for Sound Randomizer. | | | | | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | PlayOnAudioComponent | If your object has an [AudioComponent](/scripting/api/sansar.simulation/audiocomponent.md), setting this to "On" causes the sounds to play on the object. The sounds also follow the object if the object moves around. Otherwise, the sounds play directly to your speakers/headphones (like Sansar's UI sounds). | | MinDelayBetweenSounds | The delay between each sound is randomized to fall into this range. If you leave them set to zero, there is no delay between sounds. | | MaxDelayBetweenSounds | | | Sound1 | Assign any of these slots to sounds in your inventory. You do not need to assign all of them. The script plays from the slots that have been assigned. | | Sound2 | | | Sound3 | | | Sound4 | | | Sound5 | | Source: https://docs.sansar.com/scripting/examples/sound-randomizer --- # Stats Example > Example Script: Stats Example The example script, _Stats Example (StatsExample.cs)_, can provide useful statistics about the current experience. Grab the file from the download link at the end of the page. Instructions Here is a step-by-step guide to using the script: 1. Download the script file from the download link at the end of this article. 2. Follow the instructions provided in [Working with scripts](/scripting.md#guides) to upload the script and add it to an object. 3. Since this script has no special parameters to set, your script is ready. Save and build your scene. 4. If you want to verify if the script is running correctly, visit the built scene. 5. While visiting the scene, open the Chat app. 6. In the chat field, enter one of the commands listed below in order to get the desired information. | **Command** | **Returned result** | | ----------- | --------------------------------------------------------------------------------- | | /help | Provides information about the other commands. | | /fire | Causes you to fire a cannonball. | | /xpinfo | Provides information about the current experience, including name, IDs, and more. | | /listagents | Lists all agents currently in the scene. | | /mypos | Tells you your current position within the scene. | Source: https://docs.sansar.com/scripting/examples/stats-example --- # Teleport Hotkeys > Example Script: Teleport Hotkeys This example script, _Teleport Hotkeys (TeleportHotkeys.cs)_, allows you to set hotkeys that teleport users to another experience when pressed. Instructions Here is a step-by-step guide to using the script: 1. Download the script file from the download link at the end of this article. 2. Follow the instructions provided in [Working with scripts](/scripting.md#guides) to upload the script and add it to an object. 3. Open the object's Properties panel and go to the Script Settings section. 4. Upon looking at the Script Settings section for _TeleportHotkeys_, you will see a list of parameters which you can set for the object. Setting values on these parameters can help you set the teleport hotkey and experience destination. See the section on Script Parameters for a full listing of parameters. 5. Set a TeleportHotkey that will be used to trigger the script. 6. To grab the experience name and Avatar ID of the experience that you want as a teleport location, go to the details page of the the experience that you want to designate. 7. Once you are on the experience details page, click **Copy URL** on the bottom left corner of the details page. This opens a new window which shows the experience's URL, where you can copy the Experience name and the creator's Avatar ID (Persona Handle) as seen below. |  | | -------------------------------------------------------------------------------------------------------------------- | | Access the experience URL to access the Avatar ID (aka Persona Handle) and Experience name. | 8. Once you have finished setting the parameters for your object, your script is ready! Save and build your scene. 9. If you want to verify that the script is running correctly, visit the scene once it has been built. Script parameters |Click Block in someone's user profile in order to silence their voice chat and hide their avatar from your view. If the person is your friend, they are automatically removed from your Friends list.
Click Unblock in someone's user profile in order to restore their voice chat and visibility. Friendship must be added again separately
Press Block when looking at an avatar and left-clicking or holding a grip button.
Click the Microphone icon on someone's user profile to silence all voice chat from the selected person.
Press Mute when looking at an avatar and left-clicking or holding a grip button to silence all voice chat from that person.
Since Sansar is still in the Creator Beta stages, some updates may contain known issues upon release. Please check the Announcements section to find out what the expected issues are in the current iteration of the release.
The release notes capture the known issues for the latest release and from previous releases. This is also a great avenue to check whether previously known and/or reported issues have been resolved.
| |Bugs
Support
The Bugs or Support channels in the forum is the best place for users to report issues they encounter while using the Sansar client or website.
Please check this section and see if the issue you are experiencing has already been reported by other users. If the issue is already logged, please feel free to provide additional input in the comments.
We highly encourage you to report bugs and issues here so that the Sansar Support team can field your report. At the same time, your reports are visible to other users who may be experiencing the same issue.
| **Reporting other issues:** | | | | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Abuse | If you have issues with another user, or encounter content or an experience that breaks Sansar's rules, report the problem to a staff member on Discord. Look for '- Sansar' after their username. To report abuse in Sansar, see [Reporting abuse](/safety/reporting-abuse). | | Questions and Answers | If you need assistance not covered by the above sections, have general inquiries, or any other needs, ask in this Channel | Source: https://docs.sansar.com/safety/reporting-issues-and-bugs --- # Guidelines > Community Standards, and the content, world publishing, store, event and Discord guidelines, plus the Creative Commons notice. Sansar's binding policies include the legal pages on sansar.com, such as the [Terms of Service](https://www.sansar.com/legal/terms-of-service), [Community Standards](https://www.sansar.com/legal/community-standards), and [Content Guidelines](https://www.sansar.com/legal/content-guidelines). The [Store listing guidelines](/guidelines/store-listing-guidelines) and [Store banner guidelines](/guidelines/store-banner-guidelines) are also part of the Terms of Service. This section covers the rules for participating in the community and for publishing worlds, events, and Store listings. Read the relevant guidelines before you publish. - [Content guidelines](/guidelines/content-guidelines) - [World publishing guidelines](/guidelines/world-publishing-guidelines) - [Store listing guidelines](/guidelines/store-listing-guidelines) - [Store banner guidelines](/guidelines/store-banner-guidelines) - [Event guidelines](/guidelines/event-guidelines) - [Sansar's Discord server rules](/guidelines/discord-server-rules) - [Creative Commons License](/guidelines/creative-commons-license) ## See also - [Community Standards ↗](https://www.sansar.com/legal/community-standards) - [Terms of Service ↗](https://www.sansar.com/legal/terms-of-service) - [Privacy Policy ↗](https://www.sansar.com/legal/privacy) Source: https://docs.sansar.com/guidelines --- # Content guidelines Sansar's [Content Guidelines](https://www.sansar.com/legal/content-guidelines) apply to anyone who creates, shares, or encounters content in Sansar, including Store sellers and event and world creators. The policy covers legality, rights and authorization, hate and harm, graphic and sexual material, getting around restrictions, and reporting abuse. ## Official policies Read the current policy text on sansar.com: - [Content Guidelines](https://www.sansar.com/legal/content-guidelines) - [Community Standards](https://www.sansar.com/legal/community-standards) - [IP Policy](https://www.sansar.com/legal/ip-policy) - [Terms of Service](https://www.sansar.com/legal/terms-of-service) ## Report abuse To report content or experiences that break the Content Guidelines, use the [Sansar Discord](https://discord.com/invite/sansarofficial). To report abusive content in Sansar, see [Reporting abuse](/safety/reporting-abuse). To report a profile or Store listing on the website, see [Report a profile or Store listing on sansar.com](/safety/report-on-sansar-com). Source: https://docs.sansar.com/guidelines/content-guidelines --- # World publishing guidelines ## World publishing guidelines You must follow these guidelines when publishing worlds. They help you publish worlds clearly so users can find what they are looking for. All published worlds must follow Sansar's [Content Guidelines](https://www.sansar.com/legal/content-guidelines). Published worlds must not: - Be empty or an unedited template world. - Contain references to Sansar, Sansar Inc., or Sansar-related terminology that may imply a false relationship with, or sponsorship, endorsement, or employment by, Sansar. These requirements apply to all text associated with worlds: - Only alphanumeric and basic punctuation characters, such as commas, periods, slashes, colons, dashes, underscores, and quotation marks, are allowed. Sansar does not support international and other special characters at this time. - Senseless or excessively repetitive use of characters, in Sansar's sole discretion, is prohibited. - Avoid replacing letters with special characters or numbers (for example, replacing "A" with "@" or "I" with "1") so your world is easy to find in search results. - There should be no leading, trailing, or creeping whitespace. - Control characters and line feeds are not allowed. - References and links to external websites or stores are not allowed. ## World name Each world name must: - Be 100 characters or fewer, including spaces. - Be clear and accurate so users can find your world. - Contain specific descriptions instead of general terms (for example, use "The Witch's House" or "Kit's House" instead of "House"). - Contain spaces between words. ## World description Each world description must: - Be 1,023 characters or fewer, including spaces. - Describe the world clearly, honestly, and accurately. Keyword spamming is strictly prohibited. - Not contain leading, trailing, or creeping whitespace; paragraphs are allowed. ## World image ## Image file requirements Each image file must: - Be in PNG format. - Have a 16:9 aspect ratio. - Not exceed 10 MB. - Be between 480 × 270 pixels (minimum) and 1920 × 1080 pixels (maximum). ## Image content guidelines Images must: - Accurately represent the world and not be misleading. - Not include the Sansar logo, user interface, or other controls. - Not imply a false relationship with, or sponsorship, endorsement, or creation by, Sansar. - Not contain links. Images also: - Should make your world stand out. We recommend bright colors, interesting angles, and similar details to make your world attractive. - Should be taken from within the world. - May contain text, but do not make text the focus of your image. - Should not use excessive borders, watermarks, logos, or inset images. Source: https://docs.sansar.com/guidelines/world-publishing-guidelines --- # Store listing guidelines ## Store listing guidelines To help promote an enjoyable experience, you must follow these guidelines when listing items on the Sansar Store (the "Store"). They help you list items effectively so buyers can find what they are looking for. To learn how to list and edit items, see [Selling Items in Sansar Store](/store/selling/manage-listings). For branding banners, see [Store banner guidelines](/guidelines/store-banner-guidelines). ## General item guidelines - All items listed in the Store must follow Sansar's [Content Guidelines](https://www.sansar.com/legal/content-guidelines). - Items must not contain references to Sansar, Sansar Inc., or Sansar-related terminology that may imply a false relationship with, or sponsorship, endorsement, or employment by, Sansar. These requirements apply to all text associated with item listings: - Only alphanumeric and basic punctuation characters, such as commas, periods, slashes, colons, dashes, underscores, and quotation marks, are allowed. Sansar does not support international characters at this time. - Senseless or excessively repetitive use of characters, in Sansar's sole discretion, is prohibited. - Avoid replacing letters with special characters or numbers (for example, replacing "A" with "@" or "I" with "1") so your item is easy to find in search results. - There should be no leading, trailing, or creeping whitespace. - Control characters and line feeds are not allowed. ## Listing guidelines ## Item name **Item Name** is the name buyers see in their inventory. You can edit it in the listing editor. The **Item Name**: - Must be 100 characters or fewer, including spaces. - Must be clear and accurate so buyers can find your item in their inventory. - Must contain alphanumeric characters and cannot consist solely of special characters. - Should avoid long strings of text. Long item names truncate after two rows in inventory. ## Listing title **Listing title** is the name that appears in the Store, on your listings page, and on a buyer's purchase list. The **Listing title** must: - Be 100 characters or fewer, including spaces. - Be clear and accurate so buyers can find your item in the Store. - Contain alphanumeric characters (it cannot consist of special characters only). - Not use underscores or symbols in place of spaces. Use spaces between words as much as possible so people can search for your items. ## Category Only 3D models and audio items have an editable **Category** in the listing editor. For all other item types, Sansar sets the category automatically. If you can change the category, you must select the available category that best identifies your item. Only accessories can be added as wearables at this time. To upload and list accessories, see [Importing Accessories](/avatars/import/importing-accessories). ## Description The **Description** must: - Be 10,000 characters or fewer, including spaces. - Describe the item clearly, honestly, and accurately. - Not contain marketing text or links to websites outside Sansar (whether associated with the item or not), except for links to informational pages such as script documentation or tutorials. - Marketing text and links pointing to items and experiences within Sansar are allowed. - Avoid tactics such as item or keyword spamming that make it hard for buyers to find what they are searching for. ## Tags **Tags** are optional and help people discover your listing. You can add up to five tags. The listing editor separates tags at whitespace (such as spaces) and converts them to lowercase. Tags: - Must be 40 characters or fewer per tag. - May contain alphanumeric characters and hyphens only, and cannot start or end with a hyphen. - Must describe the item clearly, honestly, and accurately. - May contain branded tags. Avoid tactics such as item or keyword spamming unrelated to the item. ## Price The **Price** for each item must: - Be listed in Sansar Dollars (S$) only. - Not exceed a selling price of S$1,000,000. For setting prices and minimum prices for resellable components, see [Selling Items in Sansar Store](/store/selling/manage-listings). For conversion rates, limits, and payout fees, see [Cash out your earnings](/sansar-dollars/withdraw#limits-and-fees). ## Image guidelines ## General image guidelines All images: - Must accurately represent the item. - Must be in PNG format. - Must be up to 10 MB in size. - Must be at least 600 × 600 pixels. You cannot delete the last image of a public listing; hide or unlist the item first. ## Main image requirements The main image for **all types of items**: - Must focus on showcasing the item for sale. As much as possible, avoid featuring extra items or parts that are not included in the item for sale. - Must not contain the Sansar user interface or other controls. - Must not contain added text. - Should use a background where the item clearly stands out. - You may take images in Sansar using the [screenshot app](/explore/share/taking-a-photo). - Images may use a transparent or solid-colored background. The main image for **objects**: - Must show the full item. The main image for **avatar attachments (Wearables)**: - Must show the full item. - May use Sansar avatars to showcase the accessory item. The main image for **avatars (custom avatars)**: - Must clearly showcase the avatar body. The main image for **skyboxes**: - Must feature a substantial representation of the actual skybox texture. - Must not use icons in place of the texture representation. The main image for **scripts**: - Must focus on showcasing the script's capabilities. We strongly recommend taking a screenshot of the script as applied within a scene or experience. - Must not contain text or symbols, except those that help define scripts (for example, C#, Script, or \>). - May use script icons. The main image for **audio**: - Should use an image that represents or conveys the audio. - May use audio or sound icons. ## Additional image requirements Additional images are optional. You can upload up to nine additional images to supplement the main image by showing the item in use or highlighting details not visible in the main image. Suggestions by item type: Additional images for **objects** may: - Show different angles of the item. - Show the item in use. - Highlight the scale of the item. Additional images for **avatar attachments (Wearables)** may: - Show different angles of the item. - Show the item from different angles on an avatar. Additional images for **skyboxes** may: - Show the skybox from different angles. - Include screenshots of an experience with the skybox in the background. Additional images for **scripts** may: - Show the available *Script Settings* parameters for the script. Additional images for **audio**: - Ideally, audio should not have any additional images. ## Additional notes **Accessories** To upload and list accessories, see [Avatar attachments (accessories)](/avatars/import/importing-accessories). **Audio** - We strongly recommend including a detailed description of your audio listings with information such as track length and mono, stereo, or ambisonic type. **Avatars** To upload and list custom avatars, see [Importing custom avatars](/avatars/import/importing-avatar-related-items). **Objects** - Set your 3D suite's units to meters or feet, and model your assets to real-life scale. Sansar only allows limited scaling for scenes at this time. - We strongly encourage you to add a collision mesh to your objects so buyers can make them dynamic in their scenes. - If you are uploading architecture-type items, it is best to add an avatar in one of the additional images as a size reference. **Script** - Scripts should not use Restricted APIs. See [Sansar Script APIs](/scripting/api) and [Restricted APIs](/scripting/restricted-apis). ## Prohibited behavior Any of these prohibited behaviors could result in the removal of your item from the Store, account access restrictions up to and including account termination, or both. - **Listing items in the Store:** - All items listed in the Store must follow Sansar's [Content Guidelines](https://www.sansar.com/legal/content-guidelines). - Listed items that contain harmful content or code will not be tolerated. - **Disabled items:** - If your item has been blocked or disabled on the Store, contact the [Sansar Support team](https://discord.com/invite/sansarofficial) for help. - Do not re-list items that the Sansar team has blocked or disabled on the Store until the reported issue is resolved. - **Re-listing items in the Store:** - Do not re-list items as a new listing to get around user complaints, feedback, or ratings. - **Reviewing items:** - Be honest when reviewing items and do not include false information. - Do not use alternate accounts to rate your own items. - Buying positive user reviews for your items is strictly prohibited. Source: https://docs.sansar.com/guidelines/store-listing-guidelines --- # Store banner guidelines ## Store banner guidelines You must follow these guidelines for Store banners. ## General guidelines - Store banners must follow Sansar's [Content Guidelines](https://www.sansar.com/legal/content-guidelines). - Store banners must not contain references to Sansar, Sansar Inc., or Sansar-related terminology that may imply a false relationship with, or sponsorship, endorsement, or employment by, Sansar. ## Image guidelines Store banner images: - Must be in PNG, JPEG, or WebP format. - Can be up to 10 MB in size. - Should be 1180 × 300 pixels for the best fit (the uploader does not enforce dimensions). - May contain branding or username references. - May contain text, borders, watermarks, logos, or inset images. - Must not contain URL text. ## Managing your store banner Open [Manage Listings](https://www.sansar.com/store/dashboard), select the **My Store** tab, and use **Store banner** to upload, replace, or remove your banner. For full steps, see [Upload a store banner](/store/selling/manage-listings#upload-a-store-banner). Your banner saves when the upload finishes. There is no separate save button. ## Where can you find your store banner After you upload your store banner, it displays on your shop page, though it may take a moment to appear. Buyers can open your shop page by selecting your name on a Store listing. Source: https://docs.sansar.com/guidelines/store-banner-guidelines --- # Event guidelines ## Event guidelines You must follow these guidelines when publishing events (each an "**event**") in Sansar. They help you publish events clearly so users can find what they are looking for. If you do not follow these guidelines, your event listing may be removed. ## 1.0 Event content **1.1** All events must follow Sansar's [Content Guidelines](https://www.sansar.com/legal/content-guidelines). Any event that violates the Content Guidelines will be taken down. **1.2** All event attendees, whether hosts or guests, are subject to Sansar's [Community Standards](https://www.sansar.com/legal/community-standards). Any user who violates the Community Standards will be subject to account suspension or termination. **1.3** To request permission to use Sansar trademarks or logos, including Sansar or Sansar Inc., contact Sansar through [Contact Us](https://www.sansar.com/contact-us) before using them. To report trademark or other intellectual property infringement, see Sansar's [IP Policy](https://www.sansar.com/legal/ip-policy). ## 2.0 Event name **2.1** Event names are key to attracting attendees. Event names must be clear and accurate so users can find and understand your event. **2.2** Event names are not unique in Sansar. You may use the same event name as another event creator. **2.3** Event names must be 3 to 100 characters long, including spaces. **2.4** Event names should be reasonable in length and format. **2.4.a** Use spaces between words when possible. Long strings of text with no spaces may be cut off. **2.4.b** Use only one space between words. Do not include leading, trailing, or creeping whitespace. **2.4.c** Avoid replacing letters with special characters or numbers (for example, replacing "A" with "@" or "I" with "1") so people can find your events. **2.4.d** Use alphanumeric and basic punctuation characters only, such as commas, periods, slashes, colons, dashes, underscores, and quotation marks. Sansar does not support international characters at this time. **2.4.e** Excessively repetitive use of characters for decorative or non-essential purposes, as determined in Sansar's sole discretion, is prohibited. For example, do not use event names such as "\~/\~Sansar Top 5 ~~/~~" or "--!!! Sansar Top 5 !!!--". ## 3.0 Event description **3.1** Event descriptions must describe the event clearly, honestly, and accurately so users have a clear understanding of the event. **3.2** You may add keywords to the event description. Keyword spamming is strictly prohibited. **3.3** Event descriptions must be 1,023 characters or fewer, including spaces. **3.4** You may add references and links to other Sansar pages if they are related to the event. **3.5** You may add external references and links outside Sansar-related properties in the event description if they relate to the event's content. Events are subject to removal from the Events Calendar, in Sansar's sole discretion, if they contain links or references to: - Irrelevant websites - Direct downloads - Competing product pages - Content that violates Sansar's [Content Guidelines](https://www.sansar.com/legal/content-guidelines) ## 4.0 Event location **4.1** Each event must have a designated location. Currently, you can choose only from worlds you own, whether published or hidden. At times, the Sansar team and other users may conduct events in another user's world. **4.2** Selected worlds must have a world image. If you want to use a world with no image, add one first in the world's publishing options. World images are subject to separate image guidelines from event images; see [World image](/guidelines/world-publishing-guidelines#world-image) in [World publishing guidelines](/guidelines/world-publishing-guidelines). **4.3** An event's access control is currently tied to the world's access control. To restrict access to an event or ban someone from it, use the world's [Publishing options](/create/worlds/publishing-options-for-experiences). ## 5.0 Event image **5.1** All events must have an image that represents the event. As the event creator, you can choose the world image or upload your own. **5.2** Event images must not contain any prohibited content under Sansar's [Content Guidelines](https://www.sansar.com/legal/content-guidelines). Event images that violate the Content Guidelines will be taken down. **5.3** All event images must meet these file requirements: **5.3.a** Event images must be in PNG format. **5.3.b** Event images must have a 16:9 aspect ratio. **5.3.c** Event images must not exceed 10 MB. **5.3.d** Event images must be between 480 × 270 pixels (minimum) and 1920 × 1080 pixels (maximum). **5.4** Sansar has separate image guidelines for events, worlds, and Store items. If you use a world's image for an event listing, see [World image](/guidelines/world-publishing-guidelines#world-image) in [World publishing guidelines](/guidelines/world-publishing-guidelines). If you upload a new image for the event, it must meet these rules: **5.4.a** Uploaded event images must accurately represent the event and must not be misleading or deceptive. **5.4.b** Uploaded event images do not need to show the world location. Any splash or inset image used should be relevant to the event. **5.4.c** Uploaded event images should avoid a blank background and include visual imagery. **5.4.d** Uploaded event images may contain text, but it must be large and readable in VR. **5.4.e** Uploaded event images may contain logos, borders, and inset images. **5.4.f** Uploaded event images must not include the Sansar logo, user interfaces, or other controls. They also must not include other logos owned by Sansar Inc. or third parties unless you have permission or the right to use or display them. ## 6.0 Event time **6.1** The event must have a defined date, start time, and duration. **Effective: September 10, 2018** Source: https://docs.sansar.com/guidelines/event-guidelines --- # Sansar's Discord server rules These rules apply to the [Sansar Discord server](https://discord.com/invite/sansarofficial), in addition to Sansar's [Community Standards](https://www.sansar.com/legal/community-standards). ## Our additional Discord rules are: 1. Be nice. 2. Respect the topic for each channel. You can find channel topics in the server's #welcome channel. 3. Do not post NSFW or sexually explicit content or language. 4. Do not spam several channels with the same post. For example, if you are promoting an event, post it in *one* relevant channel. 5. If you and one other person are dominating the conversation in a channel, consider moving your conversation to Direct Messages. 6. If someone says something that annoys or offends you, report the message to the Support team **and** contact an @Admin if needed. Do not engage with them or start a flame war. Walk away. 7. Share the love and have fun. If you experience abuse, contact Support on the [Sansar Discord](https://discord.com/invite/sansarofficial) **and** contact an @Admin. ## Suspensions, temporary bans, and permanent bans Access to the Discord server is a privilege, not a right. Language and images that do not offend you may still affect others differently. **Moderators evaluate all posts based on the [Community Standards](https://www.sansar.com/legal/community-standards), [Content Guidelines](https://www.sansar.com/legal/content-guidelines), [Terms of Service](https://www.sansar.com/legal/terms-of-service), and individual channel guidelines. Punishment is at their discretion.** The general escalation path for disciplinary action is: - Warning - 3-day Discord ban - 1-week Discord ban - 2-week Discord ban - 1-month Discord ban - Permanent Discord ban This escalation path is a guideline, and severe violations are dealt with as needed. Disciplinary action for Discord server behavior may extend to in-game accounts where required. Rules are subject to change. ## Appeal a ban To appeal a ban, email [appeals@sansar.com](mailto:appeals@sansar.com). Source: https://docs.sansar.com/guidelines/discord-server-rules --- # Creative Commons License > Reuse Sansar documentation under CC BY 4.0 and credit Sansar, Inc. Unless a page says otherwise, the content on docs.sansar.com is licensed under the [Creative Commons Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0/deed.en) (CC BY 4.0). You can copy, share, and adapt it for any purpose, including commercial use, as long as you follow the license terms. Code examples can include their own license and copyright notice in their source headers. Those notices apply to that code. ## Give credit When you share this content or a version you changed: - Credit Sansar, Inc. - Keep the copyright notice that comes with it. The standard notice is "© Sansar, Inc." - Link to the page you used, where you reasonably can. - Name the license, CC BY 4.0, and link to it. - If you changed the content, say so. Don't suggest that Sansar endorses you or your use. For example, if you shorten and reword the Contact support page: > Adapted from Sansar, Inc. (https://docs.sansar.com/help/contact-support). © Sansar, Inc. Licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Changes: shortened and reworded. For the full terms, see the [CC BY 4.0 legal code](https://creativecommons.org/licenses/by/4.0/legalcode.en). ## What the license doesn't cover The license doesn't grant trademark or patent rights, including rights to Sansar's name and logos. The [Terms of Service](https://www.sansar.com/legal/terms-of-service) cover Sansar's marks. To ask for permission to use them, send a request through [Contact Us](https://www.sansar.com/contact-us). Source: https://docs.sansar.com/guidelines/creative-commons-license --- # Help > Troubleshooting and FAQs, the Sansar log and cache, error messages, contacting support, and the Using sansar.com hub. - [General FAQ](/help/general-faq) - [Error Message FAQ](/help/error-message-faq) - [The Sansar Log](/help/sansar-log) - [The Sansar Cache](/help/the-sansar-cache) - [Contact support](/help/contact-support) - [Using sansar.com](/help/using-sansar-com) ## See also - [Reporting issues and bugs](/safety/reporting-issues-and-bugs) Source: https://docs.sansar.com/help --- # General FAQ Some General problems and solutions. Related FAQs: [Error Message FAQ](/help/error-message-faq.md) | [Troubleshooting Import Errors](/create/import/troubleshooting-import-errors.md) ## A specific world keeps failing to load - Your cache may have become corrupted try clearing it by following this guide. [Clear the Cache](/help/the-sansar-cache.md#clearing-the-cache) ## I have lost/forgotten my password - Please use the forgotten password link located here: [Forgot Password](https://www.sansar.com/forgot-password) or by clicking any of the 'forgot password' buttons located at any login page. You will be asked for the email associated with the account. - For steam based accounts, the login is authenticated by steam itself requiring you to be logged into the steam account that is connected to your sansar account. - I no longer have the email, please [Contact Support](/help/contact-support.md) ## I no longer have the email associated with my account and cannot reset my password. If you are logged in on the website you should be able to change the email. If you cannot access this you will need to [Contact Support](/help/contact-support.md) Source: https://docs.sansar.com/help/general-faq --- # Error Message FAQ This page lists common Sansar error messages and troubleshooting steps. Related FAQs: [General FAQ](/help/general-faq.md) | [Troubleshooting Import Errors](/create/import/troubleshooting-import-errors.md) ## Visiting worlds ### Could not visit world due to the error: unable to connect to regionserver Solution: VPN and connection issues, try restarting the client or your router. --- ### Could not visit this world because all instances are full. Solution: Wait and try again later, or join a different instance if one is available. --- ### Could not visit this world because the specified instance is full. Solution: Retry without targeting that specific instance, or wait for space to open in that instance. --- ### Could not visit this world because the specified instance was not found. Solution: Open the world again from its listing and retry. The instance may have already closed or the instance link may no longer be valid. --- ### Sorry, this world instance is full. Please try visiting again. Solution: Wait and try visiting again later. --- ### Visit world failed because the requested world is not in the current grid. Solution: You may be on a outdated client, be sure to login to the most recent one. --- ### Visit world failed because the requested world was not found. Solution: Check that the world link is correct and that the world still exists. If it is your own world, make sure the intended scene is still linked to that world. --- ### Visit event failed because the event was not found. Solution: Open the event again from its event page and retry. The event may have ended or the link may no longer be valid. --- ### Visit world failed because the specified URI could not be parsed. Solution: Use a complete, valid Sansar world or event URL instead of a partial or malformed link. --- ### Visit world failed because the world failed to load. Solution: If this is your own world, make sure the scene is linked to the world and has been built before visiting. Then retry. --- ### Visit world failed for an unknown reason. Solution: VPN or connectivity issues, try without a VPN or connecting to a different location. --- ### Visit world failed because Sansar was in the wrong state. Solution: Try again, ## Edit mode and scene editing ### Edit server is already occupied Solution: Usually after a crash, waiting some time 15 - 30 mins, will resolve on its own, if not support may need to intervene. --- ### There was an error saving the file. Solution: Make sure you have disc space. --- ### Unable to save scene: Please close the material editor before saving your scene. Solution: Close the Material Editor, then save the scene again. --- ### Unable to build scene: Please close the material editor before building your scene. Solution: Close the Material Editor, then build the scene again. --- ### Unable to close scene: Please close the material editor before closing your scene. Solution: Close the Material Editor first, then close the scene. --- ### Unable to extract selection: Please close the material editor before extracting selection. Solution: Close the Material Editor first, then try extracting the selection again. --- ### You can't move an object into one of its children. Solution: Choose a different parent, or move the child object back to the top level before regrouping. ## Store and inventory ### No store listing was found for that item number or URL. Solution: Enter the listing's 36-character item number or use the store listing page URL or Edit Listing page URL for an existing listing. --- ### You cannot change another user's store listing. Solution: Only replace or update listings that you own. If you need to sell your version, create your own listing instead. --- ### You can only update store listings for script items. Solution: Make sure you are using the replace flow on a supported item type. Script listings are updated from the scene editor, while avatar-related items are updated from the avatar editor flow. --- ### An error occurred. The item was not updated in the store. Solution: Verify that the item type is supported for listing updates, the product ID or URL is correct, and avatar-related items include a thumbnail, then retry. ## Avatar and looks ### %s is already in use. Please choose a different name. Solution: Enter a different name that is not already being used. --- ### The avatar failed to load and may be corrupted. Would you like to delete this look? Solution: Try duplicating the look. --- ### To list an item in the store, the item must have an inventory thumbnail. Please reupload the item with a thumbnail. Solution: Reupload the item with a thumbnail image before listing it. Avatar-related items need a thumbnail if you want to list or replace them in the store. --- ### This look cannot be customized because the custom avatar has been deleted from your inventory. Solution: Restore or reimport the custom avatar to your inventory, or switch that look to a different avatar. --- ### Invalid product ID or URL. Solution: Use the listing's 36-character item number, the store listing page URL, or the Edit Listing page URL. Source: https://docs.sansar.com/help/error-message-faq --- # The Sansar Log The client keeps a local running log of what you mouse over and click plus a few other basic details to help aid in figuring out what caused a crash or problem, these logs can be really helpful when needing help from support staff, No personal information is retained within the logs other than some hardware information, worlds visited during that session and your public username. most of what can be found is chatter between the client and sansar services. ## locating the log files By default the Client log files are located in C:\Users\YOURUSERNAME\AppData\Local\LindenLab\SansarClient\log or by pasteing %localappdata%\LindenLab\SansarClient\log into your file browser. The current sessions logs are held in the parent folder C:\Users\YOURUSERNAME\AppData\Local\LindenLab\SansarClient and are added to the Historic 'log' folder once your client has shutdown.Log files locations
Show hidden folders
Show hidden folders
Show hidden folders
Show hidden folders
Files you can delete or remove to clear the cache
Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api --- # Global namespace > Types in the global namespace. Types in the global namespace. | Type | Kind | Summary | |---|---|---| | [WaitCanceledException](/scripting/api/global/waitcanceledexception) | Class | Thrown by WaitFor variants which can fail without returning data. |Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/global --- # WaitCanceledException Kind: Class · Namespace: · Assembly: Sansar.Script.dll · Script API 47.10.0 Thrown by WaitFor variants which can fail without returning data. ```csharp public class WaitCanceledException : Exception ``` ## Members at a glance | Kind | Members | |---|---| | **Properties** | [Message](#message) · [Reason](#reason) | ## Properties ### MessageGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/global/waitcanceledexception --- # Sansar > Types in the Sansar namespace. Core math types for vectors, rotations, colors and numeric operations. | Type | Kind | Summary | |---|---|---| | [Color](/scripting/api/sansar/color) | Struct | The Color class holds RGBA values that define a color. | | [Mathf](/scripting/api/sansar/mathf) | Class | Floating point math constants and utilities. | | [Quaternion](/scripting/api/sansar/quaternion) | Struct | Represents a quaternion orientation. | | [Vector](/scripting/api/sansar/vector) | Struct | The Vector class represents a 3 dimensional vector. | | [VectorExtensions](/scripting/api/sansar/vectorextensions) | Class | Additional methods for Mono.Simd.Vector4f. |Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar --- # Sansar.Metadata > Types in the Sansar.Metadata namespace. Metadata interfaces for inspecting script types and their members. | Type | Kind | Summary | |---|---|---| | [IAssemblyMetadata](/scripting/api/sansar.metadata/iassemblymetadata) | Interface | Provides information about user assemblies. | | [IScriptMetadata](/scripting/api/sansar.metadata/iscriptmetadata) | Interface | Provides information about user scripts. |Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.metadata --- # IAssemblyMetadata Kind: Interface · Namespace: Sansar.Metadata · Assembly: Sansar.Script.dll · Script API 47.10.0 Provides information about user assemblies. ```csharp public interface IAssemblyMetadata ``` ## Remarks internal use only ## Members at a glance | Kind | Members | |---|---| | **Properties** | [AllTypes](#alltypes) · [CompilerApiVersion](#compilerapiversion) | ## Properties ### AllTypesGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.metadata/iassemblymetadata --- # IScriptMetadata Kind: Interface · Namespace: Sansar.Metadata · Assembly: Sansar.Script.dll · Script API 47.10.0 Provides information about user scripts. ```csharp public interface IScriptMetadata ``` ## Remarks internal use only ## Members at a glance | Kind | Members | |---|---| | **Properties** | [Name](#name) · [RegisterReflective](#registerreflective) · [Type](#type) | | **Methods** | [Create](#create) | ## Properties ### NameGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.metadata/iscriptmetadata --- # Sansar.Microthreading > Types in the Sansar.Microthreading namespace. Microthread execution and state types. | Type | Kind | Summary | |---|---|---| | [ApiErrorMode](/scripting/api/sansar.microthreading/apierrormode) | Enum | The error mode of the script. | | [Microthread](/scripting/api/sansar.microthreading/microthread) | Class | Internal class used to manage scheduling of tasks | | [Microthread.State](/scripting/api/sansar.microthreading/microthread.state) Client documentation only | Enum | Represents possible states for a Microthread |Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.microthreading --- # ApiErrorMode Kind: Enum · Namespace: Sansar.Microthreading · Assembly: Sansar.Script.dll · Script API 47.10.0 The error mode of the script. ```csharp public enum ApiErrorMode ``` ## Values | Value | Description | |---|---| | `Default` Added in 37.0.0 | Write errors to the Script Debug Console instead of throwing exceptions for some common API errors while still throwing exceptions for the more serious errors. | | `Relaxed` Added in 37.0.0 | Write errors to the Script Debug Console instead of throwing exceptions for almost all Sansar API errors. | | `Strict` Added in 37.0.0 | Throw exceptions for almost all Sansar API errors. |Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.microthreading/apierrormode --- # Microthread Kind: Class · Namespace: Sansar.Microthreading · Assembly: Sansar.Script.dll · Script API 47.10.0 Internal class used to manage scheduling of tasks ```csharp public class Microthread : IDisposable ``` ## Members at a glance | Kind | Members | |---|---| | **Constructors** | [Microthread](#microthread) | | **Fields** | [ThreadState](#threadstate) | | **Methods** | [Dispose](#dispose) · [GetCurrentThreadTicks](#getcurrentthreadticks) · [ToString](#tostring) · [Yield](#yield) · [YieldCurrentThread](#yieldcurrentthread) · [YieldIfQuantaExceeded](#yieldifquantaexceeded) | ## Constructors ### MicrothreadNo description in the API snapshot.
No description in the API snapshot.
Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.microthreading/microthread --- # Microthread.State Kind: Enum · Namespace: Sansar.Microthreading · Assembly: Sansar.Script.dll · Script API 47.10.0This type is documented in the client, but it is not in the reference assemblies that scripts compile against. Scripts may not be able to use it.
Represents possible states for a Microthread ```csharp protected enum Microthread.State ``` ## Values | Value | Description | |---|---| | `Idle` | The thread id active but waiting on events. | | `Running` | The thread is in a running state. | | `ThreadError` | An unhandled exception or other non-recoverable error has occurred and the thread will not be run. | ## Used in examples - [ScriptLibrary/Quest/QuestVisibility.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Quest/QuestVisibility.cs) - [ScriptLibrary/Scene/KeyframedMotion.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Scene/KeyframedMotion.cs) - [ScriptLibrary/Scene/Mover.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Scene/Mover.cs)Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.microthreading/microthread.state --- # Sansar.Script > Types in the Sansar.Script namespace. Script base classes, events, identifiers, logging and script configuration attributes. | Type | Kind | Summary | |---|---|---| | [AddEntryAttribute](/scripting/api/sansar.script/addentryattribute) | Class | A | | [CancelData](/scripting/api/sansar.script/canceldata) | Class | The event is sent when a subscription is canceled. | | [ComponentId](/scripting/api/sansar.script/componentid) | Struct | Encapsulates a Component Id. | | [CoroutineException](/scripting/api/sansar.script/coroutineexception) | Class | An exception occurred relating to Coroutine execution. | | [DefaultScriptAttribute](/scripting/api/sansar.script/defaultscriptattribute) | Class | Tags a class to be the default selection for this script project. | | [DefaultValueAttribute](/scripting/api/sansar.script/defaultvalueattribute) | Class | Set a default value to show in the script properties field. | | [DisplayNameAttribute](/scripting/api/sansar.script/displaynameattribute) | Class | Set the name to be shown in script properties for this field. | | [EditorVisibleAttribute](/scripting/api/sansar.script/editorvisibleattribute) | Class | Explicitly set the editor visibility of a script field or class. | | [EntriesAttribute](/scripting/api/sansar.script/entriesattribute) | Class | List of entries to populate IList or IDictionary properties with. | | [ErrorModeAttribute](/scripting/api/sansar.script/errormodeattribute) | Class | Set the Api Error mode for this script. | | [EventData](/scripting/api/sansar.script/eventdata) | Class | Base class for events. | | [ICoroutine](/scripting/api/sansar.script/icoroutine) | Interface | Token representing a coroutine. | | [IEventSubscription](/scripting/api/sansar.script/ieventsubscription) | Interface | Token representing an event subscription. | | [InstanceInterface](/scripting/api/sansar.script/instanceinterface) | Class | Base class for all Sansar Script Object Oriented C\# interfaces. | | [LockedAttribute](/scripting/api/sansar.script/lockedattribute) | Class | Locks the IDictionary or IList properties so entries can not be added or removed. | | [Log](/scripting/api/sansar.script/log) | Class | The Log class handles script logging and error reporting | | [Log.Message](/scripting/api/sansar.script/log.message) | Struct | Represents a single console message. | | [LogLevel](/scripting/api/sansar.script/loglevel) | Enum | Used by [`Log`](/scripting/api/sansar.script/log) to filter messages. | | [MaxEntriesAttribute](/scripting/api/sansar.script/maxentriesattribute) | Class | Set the Maximum number of array values allowed. | | [Memory](/scripting/api/sansar.script/memory) | Class | The Memory class reports on script pool memory use. | | [Memory.SubscriptionHandler](/scripting/api/sansar.script/memory.subscriptionhandler) | Delegate | Notifies scripts about memory events. | | [MemoryData](/scripting/api/sansar.script/memorydata) | Class | Notifies scripts about memory events. | | [MemoryUseLevel](/scripting/api/sansar.script/memoryuselevel) | Enum | Used by [`Memory`](/scripting/api/sansar.script/memory) to report script memory use. | | [MinEntriesAttribute](/scripting/api/sansar.script/minentriesattribute) | Class | Set the Minimum number of array values allowed. | | [NonReflectiveAttribute](/scripting/api/sansar.script/nonreflectiveattribute) | Class | Prevents methods from being reflected using [`Reflective.AsInterface`](/scripting/api/sansar.script/reflective#asinterface). | | [ObjectId](/scripting/api/sansar.script/objectid) | Struct | Encapsulates an Object Id. | | [OperationCompleteEvent](/scripting/api/sansar.script/operationcompleteevent) | Class | Many asynchronous APIs will trigger an OperationCompleteEvent when done. | | [RangeAttribute](/scripting/api/sansar.script/rangeattribute) | Class | Specify a range of valid values for the field in script properties. | | [Reflective](/scripting/api/sansar.script/reflective) | Class | Base class which provides for simple reflection of methods through a given interface. | | [Reflective.Context](/scripting/api/sansar.script/reflective.context) | Enum | Use with [`RegisterReflectiveAttribute`](/scripting/api/sansar.script/registerreflectiveattribute) and `Reflective.Register` to specify specific access context for the registered reflective class. | | [Reflective.ReflectiveBase](/scripting/api/sansar.script/reflective.reflectivebase) Client documentation only | Class | Internal support class. | | [RegisterReflectiveAttribute](/scripting/api/sansar.script/registerreflectiveattribute) | Class | Registers this class to be found via [`ScenePrivate.FindReflective`](/scripting/api/sansar.simulation/sceneprivate#findreflective). | | [ScriptBase](/scripting/api/sansar.script/scriptbase) | Class | Base class for all scripts, has ScriptHandle accessors and coroutine utilities. | | [ScriptBase.OperationComplete](/scripting/api/sansar.script/scriptbase.operationcomplete) | Delegate | Used to obtain notification that the operation has completed. | | [ScriptBase.ScopedLock](/scripting/api/sansar.script/scriptbase.scopedlock) | Class | Returned from [`ScriptBase.Lock`](/scripting/api/sansar.script/scriptbase#lock) for use in using statements. | | [ScriptEventData](/scripting/api/sansar.script/scripteventdata) | Class | Result of a [`ScriptBase.PostScriptEvent`](/scripting/api/sansar.script/scriptbase#postscriptevent-scriptid-string-reflective) call. | | [ScriptHandle](/scripting/api/sansar.script/scripthandle) | Class | A running script in Sansar. | | [ScriptId](/scripting/api/sansar.script/scriptid) | Struct | Encapsulates an Script Id. | | [SessionId](/scripting/api/sansar.script/sessionid) | Struct | Encapsulates a Session Id. | | [SimpleScriptEventData](/scripting/api/sansar.script/simplescripteventdata) Client documentation only | Class | Used by [`ScriptBase.PostSimpleScriptEvent`](/scripting/api/sansar.script/scriptbase#postsimplescriptevent-string-object) to send simple script events. | | [ThrottleException](/scripting/api/sansar.script/throttleexception) | Class | Thrown when a method is called too often | | [Timer](/scripting/api/sansar.script/timer) | Class | The Timer class is a static class that manages timer events for a script. | | [TooltipAttribute](/scripting/api/sansar.script/tooltipattribute) | Class | Set a helpful tooltip message to show in the editor. |Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script --- # Sansar.Script.Testing > Types in the Sansar.Script.Testing namespace. Assertions and exceptions for testing scripts. | Type | Kind | Summary | |---|---|---| | [AssertionFailureException](/scripting/api/sansar.script.testing/assertionfailureexception) Client documentation only | Class | Thrown by [`Assertions`](/scripting/api/sansar.script.testing/assertions) tests. | | [Assertions](/scripting/api/sansar.script.testing/assertions) | Class | Contains various test methods which throw exceptions if the conditions are false. |Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script.testing --- # AssertionFailureException Kind: Class · Namespace: Sansar.Script.Testing · Assembly: Sansar.Script.dll · Script API 47.10.0This type is documented in the client, but it is not in the reference assemblies that scripts compile against. Scripts may not be able to use it.
Thrown by [`Assertions`](/scripting/api/sansar.script.testing/assertions) tests. ```csharp public class AssertionFailureException : Exception ``` ## Members at a glance | Kind | Members | |---|---| | **Properties** | [Message](#message) · [StackTrace](#stacktrace) | | **Methods** | [ToString](#tostring) | ## Properties ### MessageGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script.testing/assertionfailureexception --- # Assertions Kind: Class · Namespace: Sansar.Script.Testing · Assembly: Sansar.Script.dll · Script API 47.10.0 Contains various test methods which throw exceptions if the conditions are false. ```csharp public static class Assertions ``` ## Remarks This class is restricted and may not be included in scripts for sale in the marketplace. All APIs are subject to change. ## Members at a glance | Kind | Members | |---|---| | **Properties** | [LogSuccessful](#logsuccessful) | | **Methods** | [AlmostEqual](#almostequal) · [Equal](#equal) · [Fail](#fail) · [Greater](#greater) · [NotEqual](#notequal) · [NotNull](#notnull) · [Null](#null) · [NullOrMissing](#nullormissing) · [True](#true) · [Type](#type) | ## Properties ### LogSuccessfulGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script.testing/assertions --- # AddEntryAttribute Kind: Class · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0 A ```csharp [System.AttributeUsage(System.AttributeTargets.Field, AllowMultiple=true)] public class AddEntryAttribute : Attribute ``` ## Members at a glance | Kind | Members | |---|---| | **Constructors** | [AddEntryAttribute](#addentryattribute) | ## Constructors ### AddEntryAttributeGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/addentryattribute --- # CancelData Kind: Class · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0 The event is sent when a subscription is canceled. ```csharp public class CancelData : EventData ``` ## Remarks Coroutines in a WaitFor will capture this event and throw [`WaitCanceledException`](/scripting/api/global/waitcanceledexception). ## Members at a glance | Kind | Members | |---|---| | **Properties** | [Message](#message) · [Reason](#reason) | ## Properties ### MessageGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/canceldata --- # ComponentId Kind: Struct · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0 Encapsulates a Component Id. ```csharp public struct ComponentId ``` ## Remarks The ComponentId is a unique identifier for a component. An [`ObjectId`](/scripting/api/sansar.script/objectid) can be derived from a ComponentId. ## Members at a glance | Kind | Members | |---|---| | **Fields** | [Invalid](#invalid) | | **Properties** | [ObjectId](#objectid) | | **Methods** | [Equals](#equals) · [GetHashCode](#gethashcode) · [ToString](#tostring) | | **Operators** | [op\_Equality](#op_equality) · [op\_Implicit](#op_implicit) · [op\_Inequality](#op_inequality) | ## Fields ### InvalidGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/componentid --- # CoroutineException Kind: Class · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0 An exception occurred relating to Coroutine execution. ```csharp public class CoroutineException : Exception ``` ## Remarks This exception is thrown when a coroutine method is called outside of a coroutine context (i.e. in a method that was not started with `ScriptBase.StartCoroutine`) or attempting to use the context of another script.Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/coroutineexception --- # DefaultScriptAttribute Kind: Class · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0 Tags a class to be the default selection for this script project. ```csharp [System.AttributeUsage(System.AttributeTargets.Class)] public class DefaultScriptAttribute : Attribute ``` ## Members at a glance | Kind | Members | |---|---| | **Constructors** | [DefaultScriptAttribute](#defaultscriptattribute) | ## Constructors ### DefaultScriptAttributeNo description in the API snapshot.
Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/defaultscriptattribute --- # DefaultValueAttribute Kind: Class · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0 Set a default value to show in the script properties field. ```csharp [System.AttributeUsage(System.AttributeTargets.Field)] public class DefaultValueAttribute : Attribute ``` ## Remarks Unless specified by this attribute all fields shown in script properties are initialized to the default value for their type (usually 0 or empty string equivalents.). Note that Vector and Quaternions require an appropriately formatted string to work correctly. Vectors start with '<', have 3 or 4 numerical elements seperated by commas, and end with '>'. Quaternions start with '\[', have 4 numerical elements seperated by commas, and end with '\]' ## Example ```csharp [DefaultValue("Default Event")] public string MyString = null; [DefaultValue(12.34)] public float MyFloat = 1; [DefaultValue("<1.2,3.4,5.6>")] public Sansar.Vector MyVector; [DefaultValue("[1.2,3.4,5.6,7.8]")] public Sansar.Quaternion MyQuaternion; [DefaultValue("(1.2,3.4,5.6,7.8)")] public Sansar.Color MyColor; [DefaultValue(true)] public bool MyBool; [DefaultValue(2)] [Range(-20, 5)] public int myInt; ``` ## Members at a glance | Kind | Members | |---|---| | **Constructors** | [DefaultValueAttribute](#defaultvalueattribute) | ## Constructors ### DefaultValueAttributeGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/defaultvalueattribute --- # DisplayNameAttribute Kind: Class · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0 Set the name to be shown in script properties for this field. ```csharp [System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Field)] public class DisplayNameAttribute : Attribute ``` ## Remarks By default the variable name is used, replacing underscores ('\_') with spaces. ## Members at a glance | Kind | Members | |---|---| | **Constructors** | [DisplayNameAttribute](#displaynameattribute) | ## Constructors ### DisplayNameAttributeGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/displaynameattribute --- # EditorVisibleAttribute Kind: Class · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0 Explicitly set the editor visibility of a script field or class. ```csharp [System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Field)] public class EditorVisibleAttribute : Attribute ``` ## Remarks By default only public fields are exposed in the editor. Using this attribute, protected, private or internal fields may be exposed as well. Classes can be hidden setting this attribute to false. ## Members at a glance | Kind | Members | |---|---| | **Constructors** | [EditorVisibleAttribute](#editorvisibleattribute) | | **Properties** | [Visible](#visible) | ## Constructors ### EditorVisibleAttributeGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/editorvisibleattribute --- # EntriesAttribute Kind: Class · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0 List of entries to populate IList or IDictionary properties with. ```csharp [System.AttributeUsage(System.AttributeTargets.Field)] public class EntriesAttribute : Attribute ``` ## Remarks When used with IDictionary the entries are the keys with no default values. ## Members at a glance | Kind | Members | |---|---| | **Constructors** | [EntriesAttribute](#entriesattribute) | | **Fields** | [Locked](#locked) | ## Constructors ### EntriesAttributeGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/entriesattribute --- # ErrorModeAttribute Kind: Class · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0 Set the Api Error mode for this script. ```csharp [System.AttributeUsage(System.AttributeTargets.Class)] public class ErrorModeAttribute : Attribute ``` ## Remarks Set to ApiErrorMode.Default, ApiErrorMode.Relaxed, or ApiErrorMode.Strict ## Members at a glance | Kind | Members | |---|---| | **Constructors** | [ErrorModeAttribute](#errormodeattribute) | ## Constructors ### ErrorModeAttributeGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/errormodeattribute --- # EventData Kind: Class · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0 Base class for events. ```csharp public class EventData ``` ## Members at a glance | Kind | Members | |---|---| | **Methods** | [ToString](#tostring) | ## Methods ### ToStringGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/eventdata --- # ICoroutine Kind: Interface · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0 Token representing a coroutine. ```csharp public interface ICoroutine ``` ## Remarks Manages an existing coroutine. ## Members at a glance | Kind | Members | |---|---| | **Properties** | [IsAlive](#isalive) · [IsWaiting](#iswaiting) · [Name](#name) | | **Methods** | [Abort](#abort) · [ResetSignals](#resetsignals) · [Signal](#signal) | ## Properties ### IsAliveGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/icoroutine --- # IEventSubscription Kind: Interface · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0 Token representing an event subscription. ```csharp public interface IEventSubscription ``` ## Remarks Manages existing events. ## Members at a glance | Kind | Members | |---|---| | **Properties** | [Active](#active) | | **Methods** | [Unsubscribe](#unsubscribe) | ## Properties ### ActiveGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/ieventsubscription --- # InstanceInterface Kind: Class · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0 Base class for all Sansar Script Object Oriented C\# interfaces. ```csharp public class InstanceInterface ``` ## Remarks Internal. ## Members at a glance | Kind | Members | |---|---| | **Properties** | [IsValid](#isvalid) | | **Operators** | [op\_Implicit](#op_implicit) | ## Properties ### IsValidGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/instanceinterface --- # LockedAttribute Kind: Class · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0 Locks the IDictionary or IList properties so entries can not be added or removed. ```csharp [System.AttributeUsage(System.AttributeTargets.Field)] public class LockedAttribute : Attribute ``` ## Remarks Should be used in conjunction with [`EntriesAttribute`](/scripting/api/sansar.script/entriesattribute) or [`AddEntryAttribute`](/scripting/api/sansar.script/addentryattribute). ## Members at a glance | Kind | Members | |---|---| | **Constructors** | [LockedAttribute](#lockedattribute) | ## Constructors ### LockedAttributeGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/lockedattribute --- # Log Kind: Class · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0 The Log class handles script logging and error reporting ```csharp public class Log : InstanceInterface ``` ## Remarks A simple script for viewing the log messages might be: ## Example ```csharp title="LogExample.cs" /* (C) Linden Research, Inc. All Rights Reserved. */ using Sansar.Script; using Sansar.Simulation; public class LogExample : SceneObjectScript { public override void Init() { // Basic log message Log.Write(LogLevel.Info, "LogExample initialized"); // Log with format parameters var sampleValue = "example"; Log.Write(LogLevel.Warning, "Sample value: {0}", sampleValue); // Simulate a recoverable error to show LogLevel.Error usage. var success = TryDoWork(); if (!success) { Log.Write(LogLevel.Error, "The sample work loop reported a failure."); } } private bool TryDoWork() { // Placeholder for sample logic return false; } } ```Source: Examples/LogExample.cs in the Sansar 47.10.0 client ScriptApi snapshot.
Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/log --- # Log.Message Kind: Struct · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0 Represents a single console message. ```csharp public struct Log.Message ``` ## Members at a glance | Kind | Members | |---|---| | **Properties** | [LogLevel](#loglevel) · [ScriptId](#scriptid) · [Tag](#tag) · [Text](#text) · [TimeStamp](#timestamp) | | **Methods** | [ToString](#tostring) | ## Properties ### LogLevelGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/log.message --- # LogLevel Kind: Enum · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0 Used by [`Log`](/scripting/api/sansar.script/log) to filter messages. ```csharp [System.Flags] public enum LogLevel ``` ## Values | Value | Description | |---|---| | `Debug` Added in 45.0.4 | Debugging messages. | | `Error` | Error messages. | | `Info` | Basic informational messages. | | `Warning` | Warning messages. | ## Used in examples - [FollowThePath.cs](/scripting/examples/follow-the-path) - [ReflectiveDetectorExample.cs](/scripting/examples/reflective-detector) - [SimpleScriptExample.cs](/scripting/examples/simple-script) - [TeleportHotkeys.cs](/scripting/examples/teleport-hotkeys) - [AgentGravityExample.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/AgentGravityExample.cs) - [AgentScaleExample.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/AgentScaleExample.cs) - [EventExample.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/EventExample.cs) - [LogExample.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/LogExample.cs) - [QuestDebugExample.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/QuestDebugExample.cs) - [ScriptLibrary/LibraryBase.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/LibraryBase.cs) - [ScriptLibrary/LibraryDebugger.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/LibraryDebugger.cs) - [ScriptLibrary/Quest/QuestCharacter.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Quest/QuestCharacter.cs) …and 36 more examples in the snapshot.Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/loglevel --- # MaxEntriesAttribute Kind: Class · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0 Set the Maximum number of array values allowed. ```csharp [System.AttributeUsage(System.AttributeTargets.Field)] public class MaxEntriesAttribute : Attribute ``` ## Remarks Defaults to 20, which is the system maximum. ## Members at a glance | Kind | Members | |---|---| | **Constructors** | [MaxEntriesAttribute](#maxentriesattribute) | ## Constructors ### MaxEntriesAttributeGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/maxentriesattribute --- # Memory Kind: Class · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0 The Memory class reports on script pool memory use. ```csharp public class Memory : InstanceInterface ``` ## Remarks Memory use is tracked by groups of scripts called "pools". There are two types of pools: - Scene: The scripts attached to the scene and to objects built into the scene all share a pool that is allowed a large amount of memory. - Guests: Scripts associated with each visiting user share their own pool independent of other users. These pools are allowed a smaller amount of memory. The Policy properties will reflect the use levels for the type of pool this script is associated with. ## Example ```csharp title="MemoryExample.cs" /* This content is licensed under the terms of the Creative Commons Attribution 4.0 International License. * When using this content, you must: * • Acknowledge that the content is from the Sansar Knowledge Base. * • Include our copyright notice: "2022 Sansar, Inc." * • Indicate that the content is licensed under the Creative Commons Attribution-Share Alike 4.0 International License. * • Include the URL for, or link to, the license summary at https://creativecommons.org/licenses/by-sa/4.0/deed.hi (and, if possible, to the complete license terms at https://creativecommons.org/licenses/by-sa/4.0/legalcode. * For example: * "This work uses content from the Sansar Knowledge Base. © 2022 Sansar, Inc." Licensed under the Creative Commons Attribution 4.0 International License (license summary available at https://creativecommons.org/licenses/by/4.0/ and complete license terms available at https://creativecommons.org/licenses/by/4.0/legalcode)." */ using System; using Sansar.Script; using Sansar.Simulation; // This example shows how to track and report on script memory use. // Memory use is tracked by "pool". There are two types of pools: // Scene: The scripts attached to the scene all share a pool that is allowed a large amount of memory // User: Scripts associated with each user share their own pool and are allowed a smaller amount of memory public class MemoryExample : SceneObjectScript { // Set the Report_Command in the object properties to the chat command used to get the memory report. [DefaultValue("/memory")] [DisplayName("Report Command")] public readonly string Report_Command = "/memory"; private MemoryUseLevel memoryLevel = MemoryUseLevel.Low; public override void Init() { //When the memory level changes, store the new memory level. // If used in a more complex script this event could be used to clear log history or otherwise reduce used memory Memory.Subscribe((data) => { memoryLevel = data.UseLevel; }); // Set a chat subscription that will call ReportMemory when anyone says the Report_Command ScenePrivate.Chat.Subscribe(0, null, (data) => { if (data.Message == Report_Command) ReportMemory(ScenePrivate.FindAgent(data.SourceId)); }); } // Reports the last recorded memory level from an event along with current Memory data. private void ReportMemory(AgentPrivate agent) { agent.SendChat(String.Format("Memory info: [{0}] {1}", memoryLevel.ToString(), Memory.ToString())); } } ```Source: Examples/MemoryExample.cs in the Sansar 47.10.0 client ScriptApi snapshot.
Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/memory --- # Memory.SubscriptionHandler Kind: Delegate · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0 Notifies scripts about memory events. ```csharp [System.Obsolete("Use subscription callbacks of type ActionGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/memory.subscriptionhandler --- # MemoryData Kind: Class · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0 Notifies scripts about memory events. ```csharp public class MemoryData : EventData ``` ## Remarks See [`Memory`](/scripting/api/sansar.script/memory). ## Members at a glance | Kind | Members | |---|---| | **Properties** | [TrackingId](#trackingid) · [UseLevel](#uselevel) | | **Methods** | [ToString](#tostring) | ## Properties ### TrackingIdGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/memorydata --- # MemoryUseLevel Kind: Enum · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0 Used by [`Memory`](/scripting/api/sansar.script/memory) to report script memory use. ```csharp public enum MemoryUseLevel ``` ## Values | Value | Description | |---|---| | `Critical` | Critical memory use, nearing limit. | | `Limit` | Memory limit hit, if nothing is done scripts in this pool may be disabled. | | `Low` | Script memory use under Warning level. | | `Warning` | First warning of high memory use. | ## Used in examples - [MemoryExample.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/MemoryExample.cs) - [ScriptLibrary/ScriptWatcher.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/ScriptWatcher.cs)Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/memoryuselevel --- # MinEntriesAttribute Kind: Class · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0 Set the Minimum number of array values allowed. ```csharp [System.AttributeUsage(System.AttributeTargets.Field)] public class MinEntriesAttribute : Attribute ``` ## Remarks Defaults to 0, allowing the array to be empty. ## Members at a glance | Kind | Members | |---|---| | **Constructors** | [MinEntriesAttribute](#minentriesattribute) | ## Constructors ### MinEntriesAttributeGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/minentriesattribute --- # NonReflectiveAttribute Kind: Class · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0 Prevents methods from being reflected using [`Reflective.AsInterface`](/scripting/api/sansar.script/reflective#asinterface). ```csharp [System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method | System.AttributeTargets.Property | System.AttributeTargets.Field)] public class NonReflectiveAttribute : Attribute ``` ## Remarks This can be used at the class level to block all methods or on individual methods or properties methods ## Members at a glance | Kind | Members | |---|---| | **Constructors** | [NonReflectiveAttribute](#nonreflectiveattribute) | ## Constructors ### NonReflectiveAttributeGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/nonreflectiveattribute --- # ObjectId Kind: Struct · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0 Encapsulates an Object Id. ```csharp public struct ObjectId ``` ## Remarks An ObjectId can be derived from a [`ComponentId`](/scripting/api/sansar.script/componentid). ## Members at a glance | Kind | Members | |---|---| | **Fields** | [Invalid](#invalid) | | **Methods** | [Equals](#equals) · [GetHashCode](#gethashcode) · [ToString](#tostring) | | **Operators** | [op\_Equality](#op_equality) · [op\_Implicit](#op_implicit) · [op\_Inequality](#op_inequality) | ## Fields ### InvalidGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/objectid --- # OperationCompleteEvent Kind: Class · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0 Many asynchronous APIs will trigger an OperationCompleteEvent when done. ```csharp public class OperationCompleteEvent : EventData ``` ## Remarks See [`RigidBodyComponent.SetPosition`](/scripting/api/sansar.simulation/rigidbodycomponent#setposition-vector-operationcomplete) ## Members at a glance | Kind | Members | |---|---| | **Constructors** | [OperationCompleteEvent](#operationcompleteevent) | | **Properties** | [Exception](#exception) · [Message](#message) · [Success](#success) | ## Constructors ### OperationCompleteEventGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/operationcompleteevent --- # RangeAttribute Kind: Class · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0 Specify a range of valid values for the field in script properties. ```csharp [System.AttributeUsage(System.AttributeTargets.Field)] public class RangeAttribute : Attribute ``` ## Remarks Fields with a specified range will show in script properties with both a slider and an editable field. Values will be clamped to be within the range. ## Members at a glance | Kind | Members | |---|---| | **Constructors** | [RangeAttribute](#rangeattribute) | | **Properties** | [Max](#max) · [Min](#min) | ## Constructors ### RangeAttributeGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/rangeattribute --- # Reflective Kind: Class · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0 Base class which provides for simple reflection of methods through a given interface. ```csharp public class Reflective ``` ## Remarks If the object already implements the interface it will return the object directly. Otherwise an facade class is created to map between public methods and properties. Two scripts which use a Reflective object to communicate via script events are below: ```csharp title="SharedStopwatchReaderExample.cs" /* This content is licensed under the terms of the Creative Commons Attribution 4.0 International License. * When using this content, you must: * • Acknowledge that the content is from the Sansar Knowledge Base. * • Include our copyright notice: "2022 Sansar, Inc." * • Indicate that the content is licensed under the Creative Commons Attribution-Share Alike 4.0 International License. * • Include the URL for, or link to, the license summary at https://creativecommons.org/licenses/by-sa/4.0/deed.hi (and, if possible, to the complete license terms at https://creativecommons.org/licenses/by-sa/4.0/legalcode. * For example: * "This work uses content from the Sansar Knowledge Base. © 2022 Sansar, Inc." Licensed under the Creative Commons Attribution 4.0 International License (license summary available at https://creativecommons.org/licenses/by/4.0/ and complete license terms available at https://creativecommons.org/licenses/by/4.0/legalcode)." */ using Sansar.Simulation; using Sansar.Script; using System; public class ScriptEventSourceExample : SceneObjectScript { #region ResetTime // This is the event interface that this script will use. Only the public methods and properties // that will be referenced are used. public interface ResetTime { // The current start time. // The setter is not public so this script will only ask for the getter DateTime StartTime { get; } // The calculated elapsed time TimeSpan Elapsed { get; } } #endregion ResetTime #region EditorProperties [DefaultValue("request")] public readonly string requestCommand = "request"; [DefaultValue("elapsed")] public readonly string elapsedCommand = "elapsed"; [DefaultValue("reset")] public readonly string resetCommand = "reset"; [DefaultValue(3)] public readonly double resetMinutes = .2; #endregion EditorProperties #region EventHandlers private void elapsed(ScriptEventData elapsed) { if(elapsed.Data == null) { Log.Write(LogLevel.Warning, Script.ID.ToString(), "Expected non-null event data"); return; } ResetTime resetTime = elapsed.Data.AsInterfaceSource: Examples/SharedStopwatchReaderExample.cs in the Sansar 47.10.0 client ScriptApi snapshot.
Source: Examples/SharedStopwatchExample.cs in the Sansar 47.10.0 client ScriptApi snapshot.
Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/reflective --- # Reflective.Context Kind: Enum · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0 Use with [`RegisterReflectiveAttribute`](/scripting/api/sansar.script/registerreflectiveattribute) and `Reflective.Register` to specify specific access context for the registered reflective class. ```csharp [System.Flags] public enum Reflective.Context ``` ## Values | Value | Description | |---|---| | `All` | All contexts. | | `None` | Not discoverable via FindReflective or FindScript | | `ObjectPrivate` | Works only for running scripts, makes them findable in ObjectPrivate.FindScript and ObjectPrivate.FindScripts. | | `ScenePrivate` | Findable in ScenePrivate.FindReflective | | `ScenePublic` | Findable in ScenePublic.FindReflective | ## Used in examples - [ScriptLibrary/LibraryDebugger.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/LibraryDebugger.cs) - [ScriptLibrary/Scene/Target.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Scene/Target.cs)Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/reflective.context --- # Reflective.ReflectiveBase Kind: Class · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0This type is documented in the client, but it is not in the reference assemblies that scripts compile against. Scripts may not be able to use it.
Internal support class. ```csharp public class Reflective.ReflectiveBase ``` ## Members at a glance | Kind | Members | |---|---| | **Constructors** | [ReflectiveBase](#reflectivebase) | | **Fields** | [originalObject](#originalobject) | ## Constructors ### ReflectiveBaseNo description in the API snapshot.
Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/reflective.reflectivebase --- # RegisterReflectiveAttribute Kind: Class · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0 Registers this class to be found via [`ScenePrivate.FindReflective`](/scripting/api/sansar.simulation/sceneprivate#findreflective). ```csharp [System.AttributeUsage(System.AttributeTargets.Class)] public class RegisterReflectiveAttribute : Attribute ``` ## Remarks Every instance of a reflective object with this attribute will be automatically registered with the scene to be found by [`ScenePrivate.FindReflective`](/scripting/api/sansar.simulation/sceneprivate#findreflective). Specific instances of a Reflective class can be registered manually with [`Reflective.Register`](/scripting/api/sansar.script/reflective#register). For script objects themselves it is recommended to use this attribute to minimize race conditions between Register calls and FindReflective calls. ## Members at a glance | Kind | Members | |---|---| | **Constructors** | [RegisterReflectiveAttribute](#registerreflectiveattribute) | ## Constructors ### RegisterReflectiveAttributeGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/registerreflectiveattribute --- # ScriptBase Kind: Class · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0 Base class for all scripts, has ScriptHandle accessors and coroutine utilities. ```csharp public abstract class ScriptBase : Reflective ``` ## Remarks This abstract class manages shared information for all script types. ## Members at a glance | Kind | Members | |---|---| | **Constructors** | [ScriptBase](#scriptbase) | | **Properties** | [CurrentCoroutine](#currentcoroutine) · [Log](#log) · [MaxCoroutines](#maxcoroutines) · [Memory](#memory) · [PendingEventCount](#pendingeventcount) · [Script](#script) · [ScriptEventMessageIdCount](#scripteventmessageidcount) | | **Methods** | [GetAllCoroutines](#getallcoroutines) · [GetCoroutineCount](#getcoroutinecount) · [Init](#init) · [Lock](#lock) · [PostScriptEvent](#postscriptevent) · [PostSimpleScriptEvent](#postsimplescriptevent) · [ReleaseLock](#releaselock) · [SetDefaultErrorMode](#setdefaulterrormode) · [SetRelaxedErrorMode](#setrelaxederrormode) · [SetStrictErrorMode](#setstricterrormode) · [StartCoroutine](#startcoroutine) · [SubscribeToScriptEvent](#subscribetoscriptevent) · [Terminate](#terminate) · [Wait](#wait) · [WaitFor](#waitfor) · [WaitForLock](#waitforlock) · [WaitForSignal](#waitforsignal) · [Yield](#yield) | ## Constructors ### ScriptBaseSource: Examples/CoroutineExample.cs in the Sansar 47.10.0 client ScriptApi snapshot.
Source: Examples/CoroutineEventExample.cs in the Sansar 47.10.0 client ScriptApi snapshot.
Source: Examples/EventExample.cs in the Sansar 47.10.0 client ScriptApi snapshot.
Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/scriptbase --- # ScriptBase.OperationComplete Kind: Delegate · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0 Used to obtain notification that the operation has completed. ```csharp [System.Obsolete("Deprecated. Use the Actions", false)] public delegate void ScriptBase.OperationComplete( bool success, string failureMessage ) ``` | Parameter | Type | Description | |---|---|---| | `success` | [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | true if the operation completed successfully. | | `failureMessage` | [string](https://learn.microsoft.com/dotnet/api/system.string) | A message describing the failure if success if false. | ## Remarks The failure message is intended to be used for debugging and may change without notice.Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/scriptbase.operationcomplete --- # ScriptBase.ScopedLock Kind: Class · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0 Returned from [`ScriptBase.Lock`](/scripting/api/sansar.script/scriptbase#lock) for use in using statements. ```csharp public class ScriptBase.ScopedLock : IDisposable ``` ## Remarks Do not save or store a ScopedLock outside of a using statement. ## Members at a glance | Kind | Members | |---|---| | **Methods** | [Dispose](#dispose) · [Finalize](#finalize) | ## Methods ### DisposeGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/scriptbase.scopedlock --- # ScriptEventData Kind: Class · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0 Result of a [`ScriptBase.PostScriptEvent`](/scripting/api/sansar.script/scriptbase#postscriptevent-scriptid-string-reflective) call. ```csharp public class ScriptEventData : EventData ``` ## Remarks Use [`ScriptBase.SubscribeToScriptEvent`](/scripting/api/sansar.script/scriptbase#subscribetoscriptevent-string-action-boolean) to subscribe to events. ## Members at a glance | Kind | Members | |---|---| | **Properties** | [Data](#data) · [Message](#message) · [SourceScriptId](#sourcescriptid) | ## Properties ### DataGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/scripteventdata --- # ScriptHandle Kind: Class · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0 A running script in Sansar. ```csharp public class ScriptHandle : IDisposable ``` ## Remarks This is a lightweight handle which is used by some API methods to refer to a script. ## Members at a glance | Kind | Members | |---|---| | **Properties** | [ID](#id) · [UnhandledExceptionRecoverable](#unhandledexceptionrecoverable) | | **Methods** | [Dispose](#dispose) | | **Events** | [UnhandledException](#unhandledexception) | ## Properties ### IDGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/scripthandle --- # ScriptId Kind: Struct · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0 Encapsulates an Script Id. ```csharp public struct ScriptId : IComparable, IComparableGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/scriptid --- # SessionId Kind: Struct · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0 Encapsulates a Session Id. ```csharp public struct SessionId ``` ## Remarks Session ids are unique per agent session ## Members at a glance | Kind | Members | |---|---| | **Fields** | [Invalid](#invalid) | | **Methods** | [Equals](#equals) · [GetHashCode](#gethashcode) · [ToString](#tostring) | | **Operators** | [op\_Equality](#op_equality) · [op\_Implicit](#op_implicit) · [op\_Inequality](#op_inequality) | ## Fields ### InvalidGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/sessionid --- # SimpleScriptEventData Kind: Class · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0This type is documented in the client, but it is not in the reference assemblies that scripts compile against. Scripts may not be able to use it.
Used by [`ScriptBase.PostSimpleScriptEvent`](/scripting/api/sansar.script/scriptbase#postsimplescriptevent-string-object) to send simple script events. ```csharp public class SimpleScriptEventData : Reflective ``` ## Remarks Supports sending a single Sansar or System type object between scripts, without the overhead of creating a custom Reflective class and Interface pair. Used by PostSimpleScriptEvent and SimpleScript.OnScriptEvent. ## Members at a glance | Kind | Members | |---|---| | **Constructors** | [SimpleScriptEventData](#simplescripteventdata) | | **Properties** | [Data](#data) | ## Constructors ### SimpleScriptEventDataGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/simplescripteventdata --- # ThrottleException Kind: Class · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0 Thrown when a method is called too often ```csharp public class ThrottleException : Exception ``` ## Remarks The ThrottleException class has information about the throttle rate and how fast the throttle was hit. This exception is thrown before any action is taken by the method. ## Members at a glance | Kind | Members | |---|---| | **Fields** | [Elapsed](#elapsed) · [Interval](#interval) · [MaxEvents](#maxevents) | ## Fields ### ElapsedGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/throttleexception --- # Timer Kind: Class · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0 The Timer class is a static class that manages timer events for a script. ```csharp public static class Timer ``` ## Remarks The time the event is generated is guaranteed to be no less than the given duration, but may be more depending on system load. ## Members at a glance | Kind | Members | |---|---| | **Methods** | [Cancel](#cancel) · [Create](#create) | ## Methods ### CancelGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/timer --- # TooltipAttribute Kind: Class · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0 Set a helpful tooltip message to show in the editor. ```csharp [System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Field)] public class TooltipAttribute : Attribute ``` ## Members at a glance | Kind | Members | |---|---| | **Constructors** | [TooltipAttribute](#tooltipattribute) | | **Properties** | [Value](#value) | ## Constructors ### TooltipAttributeGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.script/tooltipattribute --- # Sansar.Simulation > Types in the Sansar.Simulation namespace. Scene, object, avatar, physics, animation and interaction APIs. | Type | Kind | Summary | |---|---|---| | [AgentInfo](/scripting/api/sansar.simulation/agentinfo) | Class | The AgentInfo class has basic information and IDs for an agent. | | [AgentPrivate](/scripting/api/sansar.simulation/agentprivate) | Class | The AgentPrivate class is the full interface for interactions with avatars. | | [AgentPublic](/scripting/api/sansar.simulation/agentpublic) | Class | The AgentPublic class is a more limited subset of the [`AgentPrivate`](/scripting/api/sansar.simulation/agentprivate) API for use by other scripts in the scene. | | [AgentScript](/scripting/api/sansar.simulation/agentscript) | Class | Extend AgentScript to create a script to be attached directly to an agent. For future use: Sansar does not currently support adding scripts to agents. | | [Animation](/scripting/api/sansar.simulation/animation) | Class | Represents a scriptable Animation node. | | [AnimationBoneSubset](/scripting/api/sansar.simulation/animationbonesubset) | Enum | Enumeration for different animation skeleton subsets | | [AnimationComponent](/scripting/api/sansar.simulation/animationcomponent) | Class | The AnimationComponent handles interactions with animations. | | [AnimationComponent.SubscriptionHandler](/scripting/api/sansar.simulation/animationcomponent.subscriptionhandler) | Delegate | Animation events. | | [AnimationData](/scripting/api/sansar.simulation/animationdata) | Class | Animation events. | | [AnimationParameters](/scripting/api/sansar.simulation/animationparameters) | Struct | The AnimationParameters struct contains settings for playing animations. | | [AnimationPlaybackMode](/scripting/api/sansar.simulation/animationplaybackmode) | Enum | Enumeration for the different animation playback modes | | [AudioComponent](/scripting/api/sansar.simulation/audiocomponent) | Class | The AudioComponent handles interactions with audio components. | | [CameraComponent](/scripting/api/sansar.simulation/cameracomponent) | Class | The CameraComponent handles interactions with cameras. | | [CameraControlMode](/scripting/api/sansar.simulation/cameracontrolmode) | Enum | Type of camera mode a user is in. | | [CameraShakeHandle](/scripting/api/sansar.simulation/camerashakehandle) | Class | Stops a shake requested by the creating script; it does not report client playback. | | [CameraShakePattern](/scripting/api/sansar.simulation/camerashakepattern) | Enum | Selects the motion used by a camera shake. | | [CameraShakeSettings](/scripting/api/sansar.simulation/camerashakesettings) | Class | Configures a camera shake; changes affect subsequent starts only. | | [CharacterAnimation](/scripting/api/sansar.simulation/characteranimation) | Class | The CharacterAnimation class represents an animation that can be played on a character component. | | [CharacterComponent](/scripting/api/sansar.simulation/charactercomponent) | Class | The CharacterComponent handles character specific operations like playing CharacterAnimations. | | [CharacterTracker](/scripting/api/sansar.simulation/charactertracker) | Class | The CharacterTracker keeps track of the quests associated with a QuestCharacter for a user. | | [CharacterTrackerData](/scripting/api/sansar.simulation/charactertrackerdata) | Class | Handler for Character Tracker update events. | | [Chat](/scripting/api/sansar.simulation/chat) | Class | The Chat class handles chat subscriptions and sending messages to users and other scripts. | | [Chat.SubscriptionHandler](/scripting/api/sansar.simulation/chat.subscriptionhandler) | Delegate | Subscribe to receive events on chat messages from the system, users or scripts. | | [ChatData](/scripting/api/sansar.simulation/chatdata) | Class | Subscribe to receive events on chat messages from the system, users or scripts. | | [Client](/scripting/api/sansar.simulation/client) | Class | The Client class is used for access to the Client connected to a [`AgentPrivate`](/scripting/api/sansar.simulation/agentprivate). | | [Cluster](/scripting/api/sansar.simulation/cluster) | Class | The Cluster class handles interactions with in game objects. | | [ClusterId](/scripting/api/sansar.simulation/clusterid) | Struct | Encapsulates an Cluster Id. | | [ClusterResource](/scripting/api/sansar.simulation/clusterresource) | Class | The ClusterResource class represents a cluster that could be added to the scene. See `ScenePrivate.CreateCluster`. | | [CollisionData](/scripting/api/sansar.simulation/collisiondata) | Class | Handler for rigid body events. | | [CollisionEventPhase](/scripting/api/sansar.simulation/collisioneventphase) | Enum | Phase for events that encapsulate sequence of occurrences | | [CollisionEventType](/scripting/api/sansar.simulation/collisioneventtype) | Enum | Type of collision event. | | [CommandAction](/scripting/api/sansar.simulation/commandaction) | Enum | Specifies a command action. | | [CommandData](/scripting/api/sansar.simulation/commanddata) | Class | Command events are generated by the client when input events occur. | | [ComponentType](/scripting/api/sansar.simulation/componenttype) | Enum | Type of component. See [`ObjectPrivate.GetComponent`](/scripting/api/sansar.simulation/objectprivate#getcomponent) | | [ControlPointType](/scripting/api/sansar.simulation/controlpointtype) | Enum | Control points are a representation of some spatial inputs, primarily VR controllers. | | [DataStore](/scripting/api/sansar.simulation/datastore) | Class | The [`DataStore`](/scripting/api/sansar.simulation/datastore) class provides access to a persistent data store that can be accessed by scripts from any experience. | | [DataStore.Options](/scripting/api/sansar.simulation/datastore.options) | Struct | Controls how various [`DataStore`](/scripting/api/sansar.simulation/datastore) operations proceed. | | [DataStore.Result<T>](/scripting/api/sansar.simulation/datastore.result-1) | Class | Holds the result of operations on a [`DataStore`](/scripting/api/sansar.simulation/datastore). | | [HeldObjectData](/scripting/api/sansar.simulation/heldobjectdata) | Class | Handler for agent grab events. | | [HeldObjectEventType](/scripting/api/sansar.simulation/heldobjecteventtype) | Enum | Type of held object event. | | [HeldObjectInfo](/scripting/api/sansar.simulation/heldobjectinfo) | Struct | Information about if this HeldObjectInfo is being held by an agent. | | [HttpClient](/scripting/api/sansar.simulation/httpclient) | Class | The Http Client can be used to make HTTP requests to external services. | | [HttpClient.RequestData](/scripting/api/sansar.simulation/httpclient.requestdata) | Class | The result of a [`HttpClient.Request`](/scripting/api/sansar.simulation/httpclient#request-string-httprequestoptions-action) call. | | [HttpRequestMethod](/scripting/api/sansar.simulation/httprequestmethod) | Enum | Enumerates the possible Http Request Methods | | [HttpRequestOptions](/scripting/api/sansar.simulation/httprequestoptions) | Struct | Options used for [`HttpClient.Request`](/scripting/api/sansar.simulation/httpclient#request-string-httprequestoptions-action) | | [HttpResponse](/scripting/api/sansar.simulation/httpresponse) | Struct | Data returned from [`HttpClient.Request`](/scripting/api/sansar.simulation/httpclient#request-string-httprequestoptions-action) | | [Interaction](/scripting/api/sansar.simulation/interaction) | Class | | | [InteractionData](/scripting/api/sansar.simulation/interactiondata) | Class | Handler for Interaction events. | | [InterpolationMode](/scripting/api/sansar.simulation/interpolationmode) | Enum | Type of interpolation to use for various interfaces | | [LightComponent](/scripting/api/sansar.simulation/lightcomponent) | Class | The LightComponent handles interactions with lights. | | [LightType](/scripting/api/sansar.simulation/lighttype) | Enum | Enumeration for the different types of lights | | [MaterialProperties](/scripting/api/sansar.simulation/materialproperties) | Struct | | | [MediaAction](/scripting/api/sansar.simulation/mediaaction) | Enum | Special actions to perform on media surfaces with SetMediaAction | | [MeshComponent](/scripting/api/sansar.simulation/meshcomponent) | Class | The MeshComponent handles interactions with static meshes. | | [MirrorComponent](/scripting/api/sansar.simulation/mirrorcomponent) | Class | The MirrorComponent handles interactions with mirrors. | | [ModalDialog](/scripting/api/sansar.simulation/modaldialog) | Class | Manages a modal dialog which can be presented to the user. | | [MoveMode](/scripting/api/sansar.simulation/movemode) | Enum | Type of interpolation to use for movement | | [Mover](/scripting/api/sansar.simulation/mover) | Class | The Mover handles adding moves to process for an object. | | [ObjectPrivate](/scripting/api/sansar.simulation/objectprivate) | Class | Interface to an object in a [`Cluster`](/scripting/api/sansar.simulation/cluster) in the Scene. | | [ObjectPrivate.AddInteractionData](/scripting/api/sansar.simulation/objectprivate.addinteractiondata) | Class | The result of AddInteraction request. | | [ObjectPublic](/scripting/api/sansar.simulation/objectpublic) | Class | The ObjectPublic class is a more limited subset of the [`ObjectPrivate`](/scripting/api/sansar.simulation/objectprivate) API for use by other scripts in the scene. | | [ObjectScript](/scripting/api/sansar.simulation/objectscript) | Class | Extend SceneObjectScript to create a script that can be used on content that is rezzable in a scene. | | [Objective](/scripting/api/sansar.simulation/objective) | Class | The Objective is the interface for a user's Quest Objective | | [ObjectiveData](/scripting/api/sansar.simulation/objectivedata) | Class | Handler for Objective state change events. | | [ObjectiveDefinition](/scripting/api/sansar.simulation/objectivedefinition) | Class | The ObjectiveDefinition stores the data that is used to create quest objective instances for users. | | [ObjectiveDefinition.GetObjectiveData](/scripting/api/sansar.simulation/objectivedefinition.getobjectivedata) | Class | | | [ObjectiveState](/scripting/api/sansar.simulation/objectivestate) | Enum | State of a quest objective for a user. | | [PlayHandle](/scripting/api/sansar.simulation/playhandle) | Class | The PlayHandle represents audio play handles. | | [PlaySettings](/scripting/api/sansar.simulation/playsettings) | Struct | The PlaySettings class contains settings for playing sounds. | | [PlayStatus](/scripting/api/sansar.simulation/playstatus) | Enum | Current status of the PlayStatus. | | [Quest](/scripting/api/sansar.simulation/quest) | Class | The Quest is the interface for a user's progress in a Quest. | | [QuestCharacter](/scripting/api/sansar.simulation/questcharacter) | Class | The QuestCharacter is the interface for a Quest Character | | [QuestData](/scripting/api/sansar.simulation/questdata) | Class | Handler for Quest state change events. | | [QuestDefinition](/scripting/api/sansar.simulation/questdefinition) | Class | The QuestDefinition stores the data that is used to create quest instances for users. | | [QuestDefinition.GetQuestData](/scripting/api/sansar.simulation/questdefinition.getquestdata) | Class | | | [QuestState](/scripting/api/sansar.simulation/queststate) | Enum | State of a quest for a user. | | [RagdollRegion](/scripting/api/sansar.simulation/ragdollregion) | Enum | Flags for targeting specific ragdoll body regions. Combine with bitwise OR. | | [RayCastHit](/scripting/api/sansar.simulation/raycasthit) | Struct | Result of a Raycast. | | [ReactionData](/scripting/api/sansar.simulation/reactiondata) | Class | Subscribe to receive reaction events from users. | | [Reactions](/scripting/api/sansar.simulation/reactions) | Class | The Reactions class subscriptions to user reaction events. | | [RenderMaterial](/scripting/api/sansar.simulation/rendermaterial) | Class | The RenderMaterial handles interactions with render materials. | | [RigidBodyComponent](/scripting/api/sansar.simulation/rigidbodycomponent) | Class | The RigidBodyComponent handles interactions with rigid body physics. | | [RigidBodyComponent.SubscriptionHandler](/scripting/api/sansar.simulation/rigidbodycomponent.subscriptionhandler) | Delegate | Handler for rigid body events. | | [RigidBodyMotionType](/scripting/api/sansar.simulation/rigidbodymotiontype) | Enum | Type of motion that can be applied to a rigid body. | | [SceneInfo](/scripting/api/sansar.simulation/sceneinfo) | Class | Information about a Scene. | | [SceneObjectScript](/scripting/api/sansar.simulation/sceneobjectscript) | Class | Extend 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. | | [ScenePrivate](/scripting/api/sansar.simulation/sceneprivate) | Class | Interface for Scripts that are part of a Scene. A more complete and less limited API than [`ScenePublic`](/scripting/api/sansar.simulation/scenepublic) | | [ScenePrivate.CreateClusterData](/scripting/api/sansar.simulation/sceneprivate.createclusterdata) | Class | The result of a create cluster request. | | [ScenePrivate.CreateClusterHandler](/scripting/api/sansar.simulation/sceneprivate.createclusterhandler) | Delegate | Handler for CreateCluster | | [ScenePublic](/scripting/api/sansar.simulation/scenepublic) | Class | The Public Scene API, a more limited subset of [`ScenePrivate`](/scripting/api/sansar.simulation/sceneprivate). | | [ScriptCameraControlMode](/scripting/api/sansar.simulation/scriptcameracontrolmode) | Enum | Type of control mode to use for a script camera. | | [SimpleScript](/scripting/api/sansar.simulation/simplescript) | Class | Extend 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](/scripting/api/sansar.simulation/simplescript.onadduseroptionsattribute) Client documentation only | Class | Use to create additional OnAddUser subscriptions | | [SimpleScript.OnChatOptionsAttribute](/scripting/api/sansar.simulation/simplescript.onchatoptionsattribute) | Class | Set options for OnChat() overrides, or use to create more simple chat handlers. | | [SimpleScript.OnCollisionOptionsAttribute](/scripting/api/sansar.simulation/simplescript.oncollisionoptionsattribute) | Class | Set options for OnCollision events, or use to create more simple collision handlers. | | [SimpleScript.OnRemoveUserOptionsAttribute](/scripting/api/sansar.simulation/simplescript.onremoveuseroptionsattribute) Client documentation only | Class | Use to create additional OnRemoveUser subscriptions | | [SimpleScript.OnScriptEventOptionsAttribute](/scripting/api/sansar.simulation/simplescript.onscripteventoptionsattribute) | Class | Set options for OnScriptEvent events. | | [SimpleScript.OnTimerOptionsAttribute](/scripting/api/sansar.simulation/simplescript.ontimeroptionsattribute) | Class | Set options for OnTimer() overrides, or use to create more simple timers. | | [SimpleScript.SimpleScriptOptionsAttribute](/scripting/api/sansar.simulation/simplescript.simplescriptoptionsattribute) | Class | Internal Use Only | | [SitEventType](/scripting/api/sansar.simulation/siteventtype) | Enum | Type of sit event. | | [SitObjectData](/scripting/api/sansar.simulation/sitobjectdata) | Class | Handler for agent sit events. | | [SitObjectInfo](/scripting/api/sansar.simulation/sitobjectinfo) | Struct | Information about if an agent is sitting on this SitObjectInfo. | | [SoundResource](/scripting/api/sansar.simulation/soundresource) | Class | The SoundResource class represents a sound that could be added to the scene. | | [StreamChannel](/scripting/api/sansar.simulation/streamchannel) | Enum | For playing a stream from the scene. | | [TextureResource](/scripting/api/sansar.simulation/textureresource) | Class | The TextureResource class represents a texture from the inventory, such as a color LUT. See [`ScenePrivate.SetColorLut`](/scripting/api/sansar.simulation/sceneprivate#setcolorlut-textureresource). | | [ThumbnailedClusterResource](/scripting/api/sansar.simulation/thumbnailedclusterresource) | Class | The ThumbnailedClusterResource class represents a cluster that has properties to be shown in the UI. | | [TimeOfDayMode](/scripting/api/sansar.simulation/timeofdaymode) | Enum | How a scene's time of day runs. | | [TutorialHint](/scripting/api/sansar.simulation/tutorialhint) | Enum | Tutorial hint types. | | [TwitchData](/scripting/api/sansar.simulation/twitchdata) | Class | Twitch events are generated in response to twitch stream interaction. | | [TwitchEventType](/scripting/api/sansar.simulation/twitcheventtype) | Enum | Enumerates the types of twitch events that scripts can subscribe to. | | [UI](/scripting/api/sansar.simulation/ui) | Class | Manages the client UI. | | [UIMenu](/scripting/api/sansar.simulation/uimenu) | Class | Manages a clickable on-screen menu UI element. | | [UIProgressBar](/scripting/api/sansar.simulation/uiprogressbar) | Class | Manages a progress bar UI element. | | [UIScoreBoard](/scripting/api/sansar.simulation/uiscoreboard) | Class | Manages a score board HUD element. | | [User](/scripting/api/sansar.simulation/user) | Class | The User class handles interactions user logins and logoffs. | | [User.SubscriptionHandler](/scripting/api/sansar.simulation/user.subscriptionhandler) | Delegate | Subscribe to receive events when users enter or leave the experience, or change their chat name. | | [UserData](/scripting/api/sansar.simulation/userdata) | Class | Subscribe to receive events when users enter or leave the experience. |Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation --- # AgentInfo Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 The AgentInfo class has basic information and IDs for an agent. ```csharp public class AgentInfo : Sansar.Script.InstanceInterface ``` ## Remarks Agents may leave at any time. Attempting to use an AgentInfo interface for an agent no longer in the scene will throw a NullReferenceException. ## Members at a glance | Kind | Members | |---|---| | **Properties** | [AvatarUuid](#avataruuid) · [Handle](#handle) · [Name](#name) · [ObjectId](#objectid) · [Scale](#scale) · [SessionId](#sessionid) · [Ticket](#ticket) | | **Methods** | [ToString](#tostring) | ## Properties ### AvatarUuidGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/agentinfo --- # AgentPrivate Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 The AgentPrivate class is the full interface for interactions with avatars. ```csharp public class AgentPrivate : Sansar.Script.InstanceInterface ``` ## Remarks Use via [`AgentScript.AgentPrivate`](/scripting/api/sansar.simulation/agentscript#agentprivate) to access APIs for the agent the script is on. ## Members at a glance | Kind | Members | |---|---| | **Properties** | [AgentInfo](#agentinfo) · [Client](#client) | | **Methods** | [AddReaction](#addreaction) · [ApplyRagdollImpulse](#applyragdollimpulse) · [ApplyRagdollImpulseToRegions](#applyragdollimpulsetoregions) · [ClearAllowFlightOverride](#clearallowflightoverride) New in 47.10.0 · [ClearColorLutOverride](#clearcolorlutoverride) New in 47.10.0 · [GetAllowFlight](#getallowflight) New in 47.10.0 · [GetControlPointEnabled](#getcontrolpointenabled) · [GetControlPointOrientation](#getcontrolpointorientation) · [GetControlPointPosition](#getcontrolpointposition) · [GetGravityFactor](#getgravityfactor) · [GetHeldRigidBodies](#getheldrigidbodies) · [GetRagdollBounce](#getragdollbounce) · [GetRagdollEnabled](#getragdollenabled) · [GetScaleFactor](#getscalefactor) · [GetSpeedFactor](#getspeedfactor) · [IgnoreCollisionWith](#ignorecollisionwith) · [IsCollisionIgnoredWith](#iscollisionignoredwith) · [OverrideAudioStream](#overrideaudiostream) · [OverrideIndexedMediaSource](#overrideindexedmediasource) · [OverrideMediaSource](#overridemediasource) · [PerformIndexedMediaAction](#performindexedmediaaction) · [PerformMediaAction](#performmediaaction) · [PlaySound](#playsound) · [PlaySoundAtPosition](#playsoundatposition) · [PlaySoundOnComponent](#playsoundoncomponent) · [PlayStream](#playstream) · [PlayStreamAtPosition](#playstreamatposition) · [PlayStreamOnComponent](#playstreamoncomponent) · [RemoveReaction](#removereaction) · [SendChat](#sendchat) · [SetAllowFlight](#setallowflight) New in 47.10.0 · [SetColorLut](#setcolorlut) New in 47.10.0 · [SetGravityFactor](#setgravityfactor) · [SetRagdollBounce](#setragdollbounce) · [SetRagdollEnabled](#setragdollenabled) · [SetScaleFactor](#setscalefactor) · [SetScaleFactorAnimated](#setscalefactoranimated) · [SetSpeedFactor](#setspeedfactor) · [ToString](#tostring) | ## Properties ### AgentInfoGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/agentprivate --- # AgentPublic Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 The AgentPublic class is a more limited subset of the [`AgentPrivate`](/scripting/api/sansar.simulation/agentprivate) API for use by other scripts in the scene. ```csharp public class AgentPublic : Sansar.Script.InstanceInterface ``` ## Remarks AgentPublic has a more limited API than [`AgentPrivate`](/scripting/api/sansar.simulation/agentprivate). Agents may leave the scene at any time. Attempting to use an AgentPublic interface for an agent no longer in the scene will throw a NullReferenceException. ## Members at a glance | Kind | Members | |---|---| | **Properties** | [AgentInfo](#agentinfo) | | **Methods** | [SendChat](#sendchat) · [ToString](#tostring) | ## Properties ### AgentInfoGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/agentpublic --- # AgentScript Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Extend AgentScript to create a script to be attached directly to an agent. For future use: Sansar does not currently support adding scripts to agents. ```csharp public abstract class AgentScript : Sansar.Script.ScriptBase ``` ## Remarks Override [`ScriptBase.Init`](/scripting/api/sansar.script/scriptbase#init) for script initialization, primarily event subscriptions. Use [`AgentScript.ObjectPrivate`](/scripting/api/sansar.simulation/agentscript#objectprivate) to access the ObjectPrivate the object that represents the Agent. Use [`AgentScript.ScenePublic`](/scripting/api/sansar.simulation/agentscript#scenepublic) to access the a limited API for the Scene the agent is in. Use [`AgentScript.AgentPrivate`](/scripting/api/sansar.simulation/agentscript#agentprivate) to access the Agent the object is attached to. ## Members at a glance | Kind | Members | |---|---| | **Constructors** | [AgentScript](#agentscript) | | **Properties** | [AgentPrivate](#agentprivate) · [ObjectPrivate](#objectprivate) · [ScenePublic](#scenepublic) | ## Constructors ### AgentScriptGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/agentscript --- # Animation Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Represents a scriptable Animation node. ```csharp public class Animation : Sansar.Script.InstanceInterface ``` ## Members at a glance | Kind | Members | |---|---| | **Methods** | [GetFrameCount](#getframecount) · [GetName](#getname) · [GetParameters](#getparameters) · [IsPaused](#ispaused) · [JumpToFrame](#jumptoframe) · [Pause](#pause) · [Play](#play) · [Reset](#reset) · [SetParameters](#setparameters) | ## Methods ### GetFrameCountGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/animation --- # AnimationBoneSubset Kind: Enum · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Enumeration for different animation skeleton subsets ```csharp public enum AnimationBoneSubset ``` ## Values | Value | Description | |---|---| | `Full` Added in 39.1.0 | The full set of bones in the skeleton. | | `Subset1` Added in 39.1.0 | The first bone subset. This may not be defined for all animations. For agent animations this represents the upper body subset of bones. | ## Used in examples - [ScriptLibrary/Scene/Emote.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Scene/Emote.cs)Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/animationbonesubset --- # AnimationComponent Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 The AnimationComponent handles interactions with animations. ```csharp public class AnimationComponent : Sansar.Script.InstanceInterface ``` ## Remarks Animated objects should be manipulated through this interface. ## Members at a glance | Kind | Members | |---|---| | **Fields** | [ComponentType](#componenttype) | | **Properties** | [ComponentId](#componentid) · [DefaultAnimation](#defaultanimation) · [Name](#name) | | **Methods** | [EnqueueEvent](#enqueueevent) · [GetAnimation](#getanimation) · [GetAnimations](#getanimations) · [GetEventId](#geteventid) · [GetVectorAnimationVariable](#getvectoranimationvariable) · [HasEvent](#hasevent) · [SetPosition](#setposition) · [Subscribe](#subscribe) · [ToString](#tostring) | ## Fields ### ComponentTypeGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/animationcomponent --- # AnimationComponent.SubscriptionHandler Kind: Delegate · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Animation events. ```csharp [System.Obsolete("Use subscription callbacks of type ActionGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/animationcomponent.subscriptionhandler --- # AnimationData Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Animation events. ```csharp public class AnimationData : Sansar.Script.EventData ``` ## Remarks See [`AnimationComponent`](/scripting/api/sansar.simulation/animationcomponent). For input bindings see [`CommandData`](/scripting/api/sansar.simulation/commanddata) ## Members at a glance | Kind | Members | |---|---| | **Properties** | [BehaviorName](#behaviorname) · [ComponentId](#componentid) | | **Methods** | [ToString](#tostring) | ## Properties ### BehaviorNameGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/animationdata --- # AnimationParameters Kind: Struct · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 The AnimationParameters struct contains settings for playing animations. ```csharp public struct AnimationParameters ``` ## Members at a glance | Kind | Members | |---|---| | **Fields** | [BlendDuration](#blendduration) · [ClampToRange](#clamptorange) · [PlaybackMode](#playbackmode) · [PlaybackSpeed](#playbackspeed) · [RangeEndFrame](#rangeendframe) · [RangeStartFrame](#rangestartframe) | ## Fields ### BlendDurationGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/animationparameters --- # AnimationPlaybackMode Kind: Enum · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Enumeration for the different animation playback modes ```csharp public enum AnimationPlaybackMode ``` ## Values | Value | Description | |---|---| | `Loop` | Loop indefinitely. | | `PingPong` | Play indefinitely, alternating between forwards and backwards. | | `PlayOnce` | Play once then stop. | ## Used in examples - [AnimationExample.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/AnimationExample.cs) - [ScriptLibrary/Scene/Emote.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Scene/Emote.cs)Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/animationplaybackmode --- # AudioComponent Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 The AudioComponent handles interactions with audio components. ```csharp public class AudioComponent : Sansar.Script.InstanceInterface ``` ## Members at a glance | Kind | Members | |---|---| | **Fields** | [ComponentType](#componenttype) | | **Properties** | [ComponentId](#componentid) · [Name](#name) | | **Methods** | [PlaySoundOnComponent](#playsoundoncomponent) · [PlayStreamOnComponent](#playstreamoncomponent) · [ToString](#tostring) | ## Fields ### ComponentTypeGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/audiocomponent --- # CameraComponent Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 The CameraComponent handles interactions with cameras. ```csharp public class CameraComponent : Sansar.Script.InstanceInterface ``` ## Members at a glance | Kind | Members | |---|---| | **Fields** | [ComponentType](#componenttype) | | **Properties** | [ComponentId](#componentid) · [Name](#name) | | **Methods** | [ToString](#tostring) | ## Fields ### ComponentTypeGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/cameracomponent --- # CameraControlMode Kind: Enum · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Type of camera mode a user is in. ```csharp public enum CameraControlMode ``` ## Values | Value | Description | |---|---| | `FirstPerson` | First person camera mode, looking out from your avatar's position. | | `FlyCam` | A camera mode detached from the avatar. Also referred to as Free Cam. | | `None` | Invalid camera control mode. | | `Script` Added in 37.0.0 | Camera is being set by a script. | | `ThirdPerson` | Over the shoulder 3rd person camera mode. | ## Used in examples - [ScriptLibrary/Scene/Selector.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Scene/Selector.cs) - [ScriptLibrary/Scene/Targeting.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Scene/Targeting.cs)Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/cameracontrolmode --- # CameraShakeHandle Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Stops a shake requested by the creating script; it does not report client playback. ```csharp public sealed class CameraShakeHandle ``` ## Remarks Player comfort settings, VR limits, distance, expiry or capacity can reduce or suppress playback. A shake ends when the player leaves the world. Passing a handle to another script does not grant control. Garbage collection does not stop the shake. ## Members at a glance | Kind | Members | |---|---| | **Methods** | [Stop](#stop) New in 47.10.0 | ## Methods ### StopGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/camerashakehandle --- # CameraShakePattern Kind: Enum · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Selects the motion used by a camera shake. ```csharp public enum CameraShakePattern ``` ## Values | Value | Description | |---|---| | `Impact` New in 47.10.0 | A directional kick followed by a damped return and wobble. | | `Jitter` New in 47.10.0 | Sharp random motion that changes at the selected frequency. | | `Rumble` New in 47.10.0 | Smooth, independently varying random motion. | | `Sway` New in 47.10.0 | Smooth back-and-forth motion along the selected direction. | ## Used in examples - `CameraShakeExample.cs`Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/camerashakepattern --- # CameraShakeSettings Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Configures a camera shake; changes affect subsequent starts only. ```csharp public sealed class CameraShakeSettings ``` ## Remarks Starts snapshot these settings and apply the documented bounds. Player comfort settings and VR limits can reduce or suppress any shake. A shake ends when the player leaves the world. ```csharp title="CameraShakeExample.cs" /* This example is licensed under the Creative Commons Attribution 4.0 International License. * Copyright 2026 Sansar, Inc. https://creativecommons.org/licenses/by/4.0/ */ using System; using System.Collections.Generic; using Sansar; using Sansar.Script; using Sansar.Simulation; ///Source: Examples/CameraShakeExample.cs in the Sansar 47.10.0 client ScriptApi snapshot.
Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/camerashakesettings --- # CharacterAnimation Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 The CharacterAnimation class represents an animation that can be played on a character component. ```csharp public class CharacterAnimation : Sansar.Script.InstanceInterface ``` ## Used in examples - [ScriptLibrary/Scene/Emote.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Scene/Emote.cs)Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/characteranimation --- # CharacterComponent Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 The CharacterComponent handles character specific operations like playing CharacterAnimations. ```csharp public class CharacterComponent : Sansar.Script.InstanceInterface ``` ## Remarks Allows for doing operations specific to characters using the Sansar skeleton types ## Members at a glance | Kind | Members | |---|---| | **Fields** | [ComponentType](#componenttype) | | **Properties** | [ComponentId](#componentid) · [UsingFemaleSkeleton](#usingfemaleskeleton) · [UsingMaleSkeleton](#usingmaleskeleton) | | **Methods** | [PlayAnimation](#playanimation) · [StopAnimations](#stopanimations) · [ToString](#tostring) | ## Fields ### ComponentTypeGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/charactercomponent --- # CharacterTracker Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 The CharacterTracker keeps track of the quests associated with a QuestCharacter for a user. ```csharp public class CharacterTracker : Sansar.Script.InstanceInterface ``` ## Remarks There is as yet no way to create Quest Characters, but this functionality is coming soon. ## Members at a glance | Kind | Members | |---|---| | **Properties** | [ActiveQuestCount](#activequestcount) · [ActiveQuestDefinitions](#activequestdefinitions) · [AvailableQuestCount](#availablequestcount) · [AvailableQuestDefinitions](#availablequestdefinitions) · [CanTurnInQuestCount](#canturninquestcount) · [CanTurnInQuestDefinitions](#canturninquestdefinitions) · [SessionId](#sessionid) | | **Methods** | [Subscribe](#subscribe) · [ToString](#tostring) · [Update](#update) | ## Properties ### ActiveQuestCountGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/charactertracker --- # CharacterTrackerData Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Handler for Character Tracker update events. ```csharp public class CharacterTrackerData : Sansar.Script.EventData ``` ## Members at a glance | Kind | Members | |---|---| | **Properties** | [SessionId](#sessionid) | | **Methods** | [ToString](#tostring) | ## Properties ### SessionIdGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/charactertrackerdata --- # Chat Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 The Chat class handles chat subscriptions and sending messages to users and other scripts. ```csharp public class Chat : Sansar.Script.InstanceInterface ``` ## Members at a glance | Kind | Members | |---|---| | **Fields** | [AllChannels](#allchannels) · [DefaultChannel](#defaultchannel) · [Script](#script) · [Server](#server) · [User](#user) | | **Methods** | [MessageAllUsers](#messageallusers) · [MessageScript](#messagescript) · [Subscribe](#subscribe) | ## Fields ### AllChannelsGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/chat --- # Chat.SubscriptionHandler Kind: Delegate · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Subscribe to receive events on chat messages from the system, users or scripts. ```csharp [System.Obsolete("Use subscription callbacks of type ActionGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/chat.subscriptionhandler --- # ChatData Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Subscribe to receive events on chat messages from the system, users or scripts. ```csharp public class ChatData : Sansar.Script.EventData ``` ## Members at a glance | Kind | Members | |---|---| | **Properties** | [Channel](#channel) · [Message](#message) · [Source](#source) · [SourceId](#sourceid) · [SourceScriptId](#sourcescriptid) | | **Methods** | [ToString](#tostring) | ## Properties ### ChannelGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/chatdata --- # Client Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 The Client class is used for access to the Client connected to a [`AgentPrivate`](/scripting/api/sansar.simulation/agentprivate). ```csharp public class Client : Sansar.Script.InstanceInterface ``` ## Remarks This class is also used for receiving input events from a client. ## Members at a glance | Kind | Members | |---|---| | **Properties** | [AgentInfo](#agentinfo) · [InVrAndHandsActive](#invrandhandsactive) · [UI](#ui) | | **Methods** | [CaptureImage](#captureimage) · [ClearTutorialHint](#cleartutorialhint) · [EnableAutomaticTutorialHints](#enableautomatictutorialhints) · [GetActiveCamera](#getactivecamera) · [OpenQuestCharacterDialog](#openquestcharacterdialog) · [OpenStoreListing](#openstorelisting) · [OpenUserStore](#openuserstore) · [ResetCamera](#resetcamera) · [SendChat](#sendchat) · [SetActiveCamera](#setactivecamera) · [ShakeCamera](#shakecamera) New in 47.10.0 · [ShowTutorialHint](#showtutorialhint) · [StopAllCameraShakes](#stopallcamerashakes) New in 47.10.0 · [SubscribeToCommand](#subscribetocommand) · [SubscribeToTwitch](#subscribetotwitch) · [TeleportTo](#teleportto) · [TeleportToCharacterEditor](#teleporttocharactereditor) · [TeleportToLocation](#teleporttolocation) · [TeleportToLookbook](#teleporttolookbook) · [TeleportToUri](#teleporttouri) · [ToString](#tostring) · [VibrationPulse](#vibrationpulse) | ## Properties ### AgentInfoSource: Examples/CameraShakeExample.cs in the Sansar 47.10.0 client ScriptApi snapshot.
Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/client --- # Cluster Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 The Cluster class handles interactions with in game objects. ```csharp public class Cluster : Sansar.Script.InstanceInterface ``` ## Members at a glance | Kind | Members | |---|---| | **Properties** | [ClusterId](#clusterid) · [ObjectPrivateCount](#objectprivatecount) | | **Methods** | [Destroy](#destroy) · [GetObjectPrivate](#getobjectprivate) · [GetObjectPrivates](#getobjectprivates) · [ToString](#tostring) | ## Properties ### ClusterIdGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/cluster --- # ClusterId Kind: Struct · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Encapsulates an Cluster Id. ```csharp public struct ClusterId ``` ## Members at a glance | Kind | Members | |---|---| | **Fields** | [Invalid](#invalid) | | **Methods** | [Equals](#equals) · [GetHashCode](#gethashcode) · [ToString](#tostring) | | **Operators** | [op\_Equality](#op_equality) · [op\_Implicit](#op_implicit) · [op\_Inequality](#op_inequality) | ## Fields ### InvalidGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/clusterid --- # ClusterResource Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 The ClusterResource class represents a cluster that could be added to the scene. See `ScenePrivate.CreateCluster`. ```csharp public class ClusterResource : Sansar.Script.InstanceInterface ``` ## Members at a glance | Kind | Members | |---|---| | **Properties** | [ResourceId](#resourceid) | | **Methods** | [ToString](#tostring) | ## Properties ### ResourceIdGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/clusterresource --- # CollisionData Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Handler for rigid body events. ```csharp public class CollisionData : Sansar.Script.EventData ``` ## Members at a glance | Kind | Members | |---|---| | **Properties** | [ComponentId](#componentid) · [EventType](#eventtype) · [HitComponentId](#hitcomponentid) · [HitControlPoint](#hitcontrolpoint) · [HitObject](#hitobject) · [Phase](#phase) | | **Methods** | [ToString](#tostring) | ## Properties ### ComponentIdGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/collisiondata --- # CollisionEventPhase Kind: Enum · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Phase for events that encapsulate sequence of occurrences ```csharp public enum CollisionEventPhase ``` ## Values | Value | Description | |---|---| | `cInvalid` | No phase specified | | `cTriggerEnter` | Trigger volume was entered by a detected object | | `cTriggerExit` | Detected object has exited the trigger volume | | `Invalid` | No phase specified | | `TriggerEnter` | Trigger volume was entered by a detected object | | `TriggerExit` | Detected object has exited the trigger volume | ## Used in examples - [AgentGravityExample.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/AgentGravityExample.cs) - [AgentScaleExample.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/AgentScaleExample.cs) - [EventExample.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/EventExample.cs) - [ScriptLibrary/Quest/QuestGiverTrigger.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Quest/QuestGiverTrigger.cs) - [ScriptLibrary/Quest/QuestObjectInteraction.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Quest/QuestObjectInteraction.cs) - [ScriptLibrary/Quest/QuestObjectTrigger.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Quest/QuestObjectTrigger.cs) - [ScriptLibrary/Scene/Collisions.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Scene/Collisions.cs) - [ScriptLibrary/Scene/HintText.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Scene/HintText.cs)Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/collisioneventphase --- # CollisionEventType Kind: Enum · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Type of collision event. ```csharp [System.Flags] public enum CollisionEventType ``` ## Values | Value | Description | |---|---| | `AllCollisions` | Combination of all flags. | | `cAllCollisions` | Combination of all flags. | | `cCharacterContact` | A character collision | | `CharacterContact` | A character collision | | `cRigidBodyContact` | 0 or more collision events may appear between a sequence start and end. | | `cTrigger` | A trigger volume has been entered or exited | | `RigidBodyContact` | 0 or more collision events may appear between a sequence start and end. | | `Trigger` | A trigger volume has been entered or exited | ## Used in examples - [FollowThePath.cs](/scripting/examples/follow-the-path) - [RandomMovement.cs](/scripting/examples/random-movement) - [ReflectiveDetectorExample.cs](/scripting/examples/reflective-detector) - [AgentGravityExample.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/AgentGravityExample.cs) - [AgentScaleExample.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/AgentScaleExample.cs) - [EventExample.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/EventExample.cs) - [ObjectScriptExample.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ObjectScriptExample.cs) - [SceneObjectScriptExample.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/SceneObjectScriptExample.cs) - [ScriptLibrary/Quest/QuestGiverTrigger.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Quest/QuestGiverTrigger.cs) - [ScriptLibrary/Quest/QuestObjectInteraction.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Quest/QuestObjectInteraction.cs) - [ScriptLibrary/Quest/QuestObjectTrigger.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Quest/QuestObjectTrigger.cs) - [ScriptLibrary/Scene/Collisions.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Scene/Collisions.cs) …and 2 more examples in the snapshot.Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/collisioneventtype --- # CommandAction Kind: Enum · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Specifies a command action. ```csharp [System.Flags] public enum CommandAction ``` ## Remarks See [`Client.SubscribeToCommand`](/scripting/api/sansar.simulation/client#subscribetocommand-string-commandaction-action-action-boolean). ## Values | Value | Description | |---|---| | `All` | A combination of all other values. | | `Invalid` | An invalid command action. | | `Pressed` | Fired when the command is pressed. | | `Released` | Fired when the command is released. | ## Used in examples - [TeleportHotkeys.cs](/scripting/examples/teleport-hotkeys) - [CastRayExample.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/CastRayExample.cs) - [CommandExample.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/CommandExample.cs) - [ScriptLibrary/Scene/Hotkey.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Scene/Hotkey.cs)Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/commandaction --- # CommandData Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Command events are generated by the client when input events occur. ```csharp public class CommandData : Sansar.Script.EventData ``` ## Remarks | Command | Default Key Binding | |---|---| | Trigger | Left Mouse Button | | PrimaryAction | F | | SecondaryAction | R | | Modifier | Shift | | Action1 to Action0 | Number keys 1 to 0 | | Confirm | Enter | | Cancel | Escape | | SelectLeft | Left arrow | | SelectRight | Right arrow | | SelectUp | Up arrow | | SelectDown | Down arrow | | Keypad0 to Keypad9 | Numberpad keys 0 to 9 | | KeypadEnter | Numberpad Enter | While the agent is seated, the movement controls also generate keypad commands for vehicle driving: W/A/S/D and the VR or gamepad left analog stick map to Keypad8 (forward), Keypad4 (left), Keypad6 (right), and Keypad2 plus Keypad5 (back/brake). These aliases are only delivered while seated; when standing, the movement controls move the avatar without generating commands. Stick axes generate digital press/release events at half deflection, not continuous analog values. Sources holding the same keypad command are combined: the first source sends Pressed and the last source to release sends Released, retaining the first source's ControlPoint. An example script for handling client commands: ## Example ```csharp title="CommandExample.cs" /* This content is licensed under the terms of the Creative Commons Attribution 4.0 International License. * When using this content, you must: * • Acknowledge that the content is from the Sansar Knowledge Base. * • Include our copyright notice: "2022 Sansar, Inc." * • Indicate that the content is licensed under the Creative Commons Attribution-Share Alike 4.0 International License. * • Include the URL for, or link to, the license summary at https://creativecommons.org/licenses/by-sa/4.0/deed.hi (and, if possible, to the complete license terms at https://creativecommons.org/licenses/by-sa/4.0/legalcode. * For example: * "This work uses content from the Sansar Knowledge Base. © 2022 Sansar, Inc." Licensed under the Creative Commons Attribution 4.0 International License (license summary available at https://creativecommons.org/licenses/by/4.0/ and complete license terms available at https://creativecommons.org/licenses/by/4.0/legalcode)." */ using Sansar.Script; using Sansar.Simulation; public class CommandExample : SceneObjectScript { #region ScriptParameters [Tooltip(@"The command to enable listening for the Action Command. Default: Confirm (Enter)")] [DefaultValue("Confirm")] [DisplayName("Subscribe Command")] public readonly string SubscribeCommand; [Tooltip(@"The command to disable listening for the Action Command. Default: Cancel (Escape)")] [DefaultValue("Cancel")] [DisplayName("Unsubscribe Command")] public readonly string UnsubscribeCommand; [Tooltip(@"If the command has been subscribed to by the 'Subscribe Command', this will log the action to the script console.")] [DefaultValue("Trigger")] [DisplayName("Action Command")] public readonly string ActionCommand; #endregion ScriptParameters public override void Init() { // Subscribe to new user events; ScenePrivate.User.Subscribe(User.AddUser, NewUser); } IEventSubscription subscription = null; void NewUser(UserData newUser) { Client client = ScenePrivate.FindAgent(newUser.User).Client; // CommandReceived will be called every time the command it triggered on the client // CommandCanceled will be called if the subscription fails if (SubscribeCommand != "") { client.SubscribeToCommand(SubscribeCommand, CommandAction.Pressed, (data) => { if (subscription == null) { Log.Write(GetType().Name, $"[{SubscribeCommand}] Subscribing to {ActionCommand}."); subscription = client.SubscribeToCommand(ActionCommand, CommandAction.All, CommandReceived, CommandCanceled); } }, CommandCanceled); } if (UnsubscribeCommand != "") { client.SubscribeToCommand(UnsubscribeCommand, CommandAction.Pressed, (data) => { if (subscription != null) { Log.Write(GetType().Name, $"[{UnsubscribeCommand}] Unsubscribing to {ActionCommand}."); subscription.Unsubscribe(); subscription = null; } }, CommandCanceled); } } void CommandReceived(CommandData command) { Log.Write(GetType().Name, $"Received command {command.Command}: {command.Action}. Targeting Info: {command.TargetingComponent}, Origin:{command.TargetingOrigin}, Position:{command.TargetingPosition}, Normal{command.TargetingNormal}"); } void CommandCanceled(CancelData data) { Log.Write(GetType().Name, "Subscription canceled: "+data.Message); } } ```Source: Examples/CommandExample.cs in the Sansar 47.10.0 client ScriptApi snapshot.
Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/commanddata --- # ComponentType Kind: Enum · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Type of component. See [`ObjectPrivate.GetComponent`](/scripting/api/sansar.simulation/objectprivate#getcomponent) ```csharp public enum ComponentType ``` ## Values | Value | Description | |---|---| | `AnimationComponent` | [`AnimationComponent`](/scripting/api/sansar.simulation/animationcomponent) | | `AudioComponent` | [`AudioComponent`](/scripting/api/sansar.simulation/audiocomponent) | | `CameraComponent` Added in 37.0.0 | [`CameraComponent`](/scripting/api/sansar.simulation/cameracomponent) | | `CharacterComponent` Added in 39.1.0 | [`CameraComponent`](/scripting/api/sansar.simulation/cameracomponent) | | `LightComponent` | [`LightComponent`](/scripting/api/sansar.simulation/lightcomponent) | | `MeshComponent` Added in 34.0.0 | [`MeshComponent`](/scripting/api/sansar.simulation/meshcomponent) | | `MirrorComponent` Added in 47.1.1 | [`MirrorComponent`](/scripting/api/sansar.simulation/mirrorcomponent) | | `RigidBodyComponent` | [`RigidBodyComponent`](/scripting/api/sansar.simulation/rigidbodycomponent) | ## Used in examples - [ScriptLibrary/Quest/QuestVisibility.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Quest/QuestVisibility.cs) - [ScriptLibrary/Scene/Light.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Scene/Light.cs) - [ScriptLibrary/Scene/LightOnOff.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Scene/LightOnOff.cs)Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/componenttype --- # ControlPointType Kind: Enum · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Control points are a representation of some spatial inputs, primarily VR controllers. ```csharp public enum ControlPointType ``` ## Remarks See: [`AgentPrivate.GetControlPointPosition`](/scripting/api/sansar.simulation/agentprivate#getcontrolpointposition) to get a control point's position. [`AgentPrivate.GetControlPointOrientation`](/scripting/api/sansar.simulation/agentprivate#getcontrolpointorientation) to get a control point's orientation [`AgentPrivate.GetControlPointEnabled`](/scripting/api/sansar.simulation/agentprivate#getcontrolpointenabled) to see if a control point is enabled. ## Values | Value | Description | |---|---| | `Count` | Count of total possible control point types. Control points from 0 to (cCount - 1) are valid, however not all have meaningful data on the server for scripts. | | `DesktopGrab` | Used when grabbing objects in desktop mode, follows the characters right hand | | `GazeTarget` | A VR head mounted display (HMD) control point, for the position and direction of the HMD. | | `Invalid` | An invalid control point. | | `LeftTool` | Left hand VR controller. | | `RightTool` | Right hand VR controller. | ## Used in examples - [BanHammerExample.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/BanHammerExample.cs) - [CastRayExample.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/CastRayExample.cs) - [PewPewExample.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/PewPewExample.cs) - [ScriptLibrary/Scene/Collisions.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Scene/Collisions.cs) - [ScriptLibrary/Scene/GrabRelease.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Scene/GrabRelease.cs) - [ScriptLibrary/Scene/HintText.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Scene/HintText.cs) - [ScriptLibrary/Scene/Selector.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Scene/Selector.cs) - [ScriptLibrary/Scene/Targeting.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Scene/Targeting.cs)Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/controlpointtype --- # DataStore Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 The [`DataStore`](/scripting/api/sansar.simulation/datastore) class provides access to a persistent data store that can be accessed by scripts from any experience. ```csharp public class DataStore ``` ## Remarks All [`DataStore`](/scripting/api/sansar.simulation/datastore) objects with a given [`DataStore.Id`](/scripting/api/sansar.simulation/datastore#id) share the same database. ## Members at a glance | Kind | Members | |---|---| | **Properties** | [Id](#id) | | **Methods** | [Delete](#delete) · [Restore](#restore) · [Store](#store) | ## Properties ### IdGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/datastore --- # DataStore.Options Kind: Struct · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Controls how various [`DataStore`](/scripting/api/sansar.simulation/datastore) operations proceed. ```csharp public struct DataStore.Options ``` ## Members at a glance | Kind | Members | |---|---| | **Fields** | [RetrieveData](#retrievedata) · [SerializerOptions](#serializeroptions) · [Version](#version) | ## Fields ### RetrieveDataGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/datastore.options --- # DataStore.ResultGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/datastore.result-1 --- # HeldObjectData Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Handler for agent grab events. ```csharp public class HeldObjectData : Sansar.Script.EventData ``` ## Members at a glance | Kind | Members | |---|---| | **Properties** | [ComponentId](#componentid) · [HeldObjectEvent](#heldobjectevent) · [HeldObjectInfo](#heldobjectinfo) · [ObjectId](#objectid) | | **Methods** | [ToString](#tostring) | ## Properties ### ComponentIdGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/heldobjectdata --- # HeldObjectEventType Kind: Enum · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Type of held object event. ```csharp [System.Flags] public enum HeldObjectEventType ``` ## Values | Value | Description | |---|---| | `Grab` | Grabbed by a player avatar. | | `Release` | Released by a player avatar. | ## Used in examples - [BanHammerExample.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/BanHammerExample.cs) - [PewPewExample.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/PewPewExample.cs) - [ScriptLibrary/Scene/GrabRelease.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Scene/GrabRelease.cs) - [ScriptLibrary/Scene/PositionReset.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Scene/PositionReset.cs) - [ScriptLibrary/Scene/Selector.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Scene/Selector.cs) - [ScriptLibrary/Scene/Targeting.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Scene/Targeting.cs)Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/heldobjecteventtype --- # HeldObjectInfo Kind: Struct · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Information about if this HeldObjectInfo is being held by an agent. ```csharp public struct HeldObjectInfo ``` ## Members at a glance | Kind | Members | |---|---| | **Fields** | [ControlPoint](#controlpoint) · [IsHeld](#isheld) · [LocalPosition](#localposition) · [SessionId](#sessionid) | ## Fields ### ControlPointGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/heldobjectinfo --- # HttpClient Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 The Http Client can be used to make HTTP requests to external services. ```csharp public class HttpClient : Sansar.Script.InstanceInterface ``` ## Remarks A simple script to get some external data might be: ## Example ```csharp title="HttpClientExample.cs" /* This content is licensed under the terms of the Creative Commons Attribution 4.0 International License. * When using this content, you must: * • Acknowledge that the content is from the Sansar Knowledge Base. * • Include our copyright notice: "2022 Sansar, Inc." * • Indicate that the content is licensed under the Creative Commons Attribution-Share Alike 4.0 International License. * • Include the URL for, or link to, the license summary at https://creativecommons.org/licenses/by-sa/4.0/deed.hi (and, if possible, to the complete license terms at https://creativecommons.org/licenses/by-sa/4.0/legalcode. * For example: * "This work uses content from the Sansar Knowledge Base. © 2022 Sansar, Inc." Licensed under the Creative Commons Attribution 4.0 International License (license summary available at https://creativecommons.org/licenses/by/4.0/ and complete license terms available at https://creativecommons.org/licenses/by/4.0/legalcode)." */ using Sansar.Script; using Sansar.Simulation; using System; using System.Collections.Generic; using System.Text; public class HttpClientExample : SceneObjectScript { public override void Init() { HttpRequestOptions options = new HttpRequestOptions(); options.Parameters = new DictionarySource: Examples/HttpClientExample.cs in the Sansar 47.10.0 client ScriptApi snapshot.
Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/httpclient --- # HttpClient.RequestData Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 The result of a [`HttpClient.Request`](/scripting/api/sansar.simulation/httpclient#request-string-httprequestoptions-action) call. ```csharp public class HttpClient.RequestData : Sansar.Script.OperationCompleteEvent ``` ## Members at a glance | Kind | Members | |---|---| | **Properties** | [Response](#response) | | **Methods** | [ToString](#tostring) | ## Properties ### ResponseGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/httpclient.requestdata --- # HttpRequestMethod Kind: Enum · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Enumerates the possible Http Request Methods ```csharp public enum HttpRequestMethod ``` ## Values | Value | Description | |---|---| | `DELETE` | Perform a DELETE request | | `GET` | Perform a GET request | | `HEAD` | Perform a HEAD request | | `PATCH` | Perform a PATCH request | | `POST` | Perform a POST request | | `PUT` | Perform a PUT request |Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/httprequestmethod --- # HttpRequestOptions Kind: Struct · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Options used for [`HttpClient.Request`](/scripting/api/sansar.simulation/httpclient#request-string-httprequestoptions-action) ```csharp public struct HttpRequestOptions ``` ## Members at a glance | Kind | Members | |---|---| | **Fields** | [Body](#body) · [DisableRedirect](#disableredirect) · [Headers](#headers) · [Method](#method) · [Parameters](#parameters) · [RetrieveAllHeaders](#retrieveallheaders) | ## Fields ### BodyGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/httprequestoptions --- # HttpResponse Kind: Struct · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Data returned from [`HttpClient.Request`](/scripting/api/sansar.simulation/httpclient#request-string-httprequestoptions-action) ```csharp public struct HttpResponse ``` ## Members at a glance | Kind | Members | |---|---| | **Fields** | [Body](#body) · [Headers](#headers) · [Status](#status) | ## Fields ### BodyGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/httpresponse --- # Interaction Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 ```csharp public class Interaction : Sansar.Script.InstanceInterface ``` ## Members at a glance | Kind | Members | |---|---| | **Methods** | [GetEnabled](#getenabled) · [GetPrompt](#getprompt) · [SetEnabled](#setenabled) · [SetPrompt](#setprompt) · [Subscribe](#subscribe) | ## Methods ### GetEnabledGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/interaction --- # InteractionData Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Handler for Interaction events. ```csharp public class InteractionData : Sansar.Script.EventData ``` ## Members at a glance | Kind | Members | |---|---| | **Properties** | [AgentId](#agentid) · [ControlPoint](#controlpoint) · [HitNormal](#hitnormal) · [HitPosition](#hitposition) · [Origin](#origin) | | **Methods** | [ToString](#tostring) | ## Properties ### AgentIdGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/interactiondata --- # InterpolationMode Kind: Enum · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Type of interpolation to use for various interfaces ```csharp public enum InterpolationMode ``` ## Remarks The output value is computed according to the interpolation type with a parametric parameter 't' that varies from zero to one. - Linear is directly proportional to 't'. - Ease-in is proportional to 't^2'. - Ease-out is computed with 't\*(2-t)'. - Smoothstep interpolation uses '(3-2t)\*t^2'. - Step interpolation uses '0' for 't<0.5' and '1' for 't>=0.5'. ## Values | Value | Description | |---|---| | `EaseIn` Added in 37.0.0 | Ease In. The value will gradually speed up and continue quickly at the end. | | `EaseOut` Added in 37.0.0 | Ease Out. The value will change quickly at first and slow down to smoothly reach the goal. | | `Linear` Added in 37.0.0 | Linear Interpolation. The value will change at a constant rate. | | `Smoothstep` Added in 37.0.0 | Smoothstep Interpolation. The value will speed up gradually and slow down to smoothly reach the goal. | | `Step` Added in 37.0.0 | Step. The value will step abruptly from the initial value to the final value half-way through. |Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/interpolationmode --- # LightComponent Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 The LightComponent handles interactions with lights. ```csharp public class LightComponent : Sansar.Script.InstanceInterface ``` ## Members at a glance | Kind | Members | |---|---| | **Fields** | [ComponentType](#componenttype) | | **Properties** | [ComponentId](#componentid) · [IsScriptable](#isscriptable) · [LightType](#lighttype) · [Name](#name) | | **Methods** | [GetAngle](#getangle) · [GetAngularFalloff](#getangularfalloff) · [GetCastsShadows](#getcastsshadows) · [GetNearClip](#getnearclip) · [GetNormalizedColor](#getnormalizedcolor) · [GetRange](#getrange) · [GetRelativeIntensity](#getrelativeintensity) · [GetShadowPriority](#getshadowpriority) · [SetAngle](#setangle) · [SetAngularFalloff](#setangularfalloff) · [SetCastsShadows](#setcastsshadows) · [SetColorAndIntensity](#setcolorandintensity) · [SetNearClip](#setnearclip) · [SetRange](#setrange) · [SetShadowPriority](#setshadowpriority) · [ToString](#tostring) | ## Fields ### ComponentTypeGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/lightcomponent --- # LightType Kind: Enum · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Enumeration for the different types of lights ```csharp public enum LightType ``` ## Values | Value | Description | |---|---| | `Directional` | Lights that illuminate in a single direction across the entire scene. | | `Point` | Lights that illuminate from a point outward in all directions. | | `Spot` | Lights that illuminate from a point outward in a cone shape. |Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/lighttype --- # MaterialProperties Kind: Struct · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 ```csharp public struct MaterialProperties ``` ## Members at a glance | Kind | Members | |---|---| | **Fields** | [Absorption](#absorption) · [ApplyGlobalWind](#applyglobalwind) New in 47.10.0 · [ApplyUvOffsetToAo](#applyuvoffsettoao) · [ApplyUvOffsetToDiffuse](#applyuvoffsettodiffuse) · [ApplyUvOffsetToEmissive](#applyuvoffsettoemissive) · [AudioReactAdaptiveDisplacement](#audioreactadaptivedisplacement) · [AudioReactAdaptiveFlashEmissive](#audioreactadaptiveflashemissive) · [AudioReactDisplacementOnHigh](#audioreactdisplacementonhigh) · [AudioReactDisplacementOnLow](#audioreactdisplacementonlow) · [AudioReactDisplacementOnMid](#audioreactdisplacementonmid) · [AudioReactEmissiveBrightness](#audioreactemissivebrightness) · [AudioReactEmissiveColor](#audioreactemissivecolor) · [AudioReactFlashEmissiveOnHigh](#audioreactflashemissiveonhigh) · [AudioReactFlashEmissiveOnLow](#audioreactflashemissiveonlow) · [AudioReactFlashEmissiveOnMid](#audioreactflashemissiveonmid) · [AudioReactFlipbookFrame](#audioreactflipbookframe) · [BladeDensity](#bladedensity) New in 47.10.0 · [BladeHeight](#bladeheight) New in 47.10.0 · [BladeWidth](#bladewidth) New in 47.10.0 · [BlendDisplacementFlipbook](#blenddisplacementflipbook) · [BlendOnDisplacementLoop](#blendondisplacementloop) · [Brightness](#brightness) · [DirtRoughness](#dirtroughness) New in 47.10.0 · [DrawAfterimages](#drawafterimages) · [EmissiveIntensity](#emissiveintensity) · [FlipbookFrame](#flipbookframe) · [FlipbookIndex](#flipbookindex) · [FurDensity](#furdensity) New in 47.10.0 · [FurLength](#furlength) New in 47.10.0 · [FurRootColor](#furrootcolor) New in 47.10.0 · [FurThickness](#furthickness) New in 47.10.0 · [FurTipColor](#furtipcolor) New in 47.10.0 · [GrassDensity](#grassdensity) New in 47.10.0 · [GrassDirtColor](#grassdirtcolor) New in 47.10.0 · [GrassLength](#grasslength) New in 47.10.0 · [GrassRootColor](#grassrootcolor) New in 47.10.0 · [GrassThickness](#grassthickness) New in 47.10.0 · [GrassTipColor](#grasstipcolor) New in 47.10.0 · [GravityStrength](#gravitystrength) New in 47.10.0 · [LoopDisplacementFlipbook](#loopdisplacementflipbook) · [LoopFlipbook](#loopflipbook) · [PingPongDisplacementFlipbook](#pingpongdisplacementflipbook) · [ReceiveReflection](#receivereflection) · [RenderBlades](#renderblades) New in 47.10.0 · [RenderFins](#renderfins) New in 47.10.0 · [RenderShells](#rendershells) New in 47.10.0 · [Roughness](#roughness) New in 47.10.0 · [ScrollAlbedo](#scrollalbedo) · [ScrollAo](#scrollao) · [ScrollDisplacement](#scrolldisplacement) · [ScrollDisplacementFactor](#scrolldisplacementfactor) · [ScrollEmissive](#scrollemissive) · [ScrollMask](#scrollmask) · [ScrollMetalness](#scrollmetalness) · [ScrollNormalRoughness](#scrollnormalroughness) · [SelfShadowStrength](#selfshadowstrength) New in 47.10.0 · [ShadowCasting](#shadowcasting) · [ShellHeight](#shellheight) New in 47.10.0 · [Tint](#tint) · [UseCustomBladeShape](#usecustombladeshape) New in 47.10.0 · [VatBlendAnimLoop](#vatblendanimloop) · [VatFrame](#vatframe) · [VatLoopAnim](#vatloopanim) · [VatLoopRunLength](#vatlooprunlength) · [VatLoopStartFrame](#vatloopstartframe) · [VatPingPongAnim](#vatpingponganim) · [VatStepRate](#vatsteprate) · [WindFlowScale](#windflowscale) New in 47.10.0 · [WindStrength](#windstrength) New in 47.10.0 | ## Fields ### AbsorptionGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/materialproperties --- # MediaAction Kind: Enum · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Special actions to perform on media surfaces with SetMediaAction ```csharp public enum MediaAction ``` ## Values | Value | Description | |---|---| | `Invalid` | Invalid action. | | `TwitchMaturityClick` | Click the maturity link on twitch streams. |Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/mediaaction --- # MeshComponent Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 The MeshComponent handles interactions with static meshes. ```csharp public class MeshComponent : Sansar.Script.InstanceInterface ``` ## Members at a glance | Kind | Members | |---|---| | **Fields** | [ComponentType](#componenttype) | | **Properties** | [ComponentId](#componentid) · [IsScriptable](#isscriptable) · [Name](#name) | | **Methods** | [GetIsVisible](#getisvisible) · [GetRenderMaterial](#getrendermaterial) · [GetRenderMaterials](#getrendermaterials) · [SetIsVisible](#setisvisible) · [ToString](#tostring) | ## Fields ### ComponentTypeGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/meshcomponent --- # MirrorComponent Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 The MirrorComponent handles interactions with mirrors. ```csharp public class MirrorComponent : Sansar.Script.InstanceInterface ``` ## Members at a glance | Kind | Members | |---|---| | **Fields** | [ComponentType](#componenttype) | | **Properties** | [ComponentId](#componentid) · [IsScriptable](#isscriptable) · [Name](#name) | | **Methods** | [GetIsEnabled](#getisenabled) · [SetIsEnabled](#setisenabled) · [ToString](#tostring) | ## Fields ### ComponentTypeGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/mirrorcomponent --- # ModalDialog Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Manages a modal dialog which can be presented to the user. ```csharp public class ModalDialog : Sansar.Script.InstanceInterface ``` ## Remarks Set the message and the button text. ## Members at a glance | Kind | Members | |---|---| | **Properties** | [Message](#message) · [Response](#response) | | **Methods** | [Cancel](#cancel) · [Show](#show) · [ToString](#tostring) | ## Properties ### MessageGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/modaldialog --- # MoveMode Kind: Enum · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Type of interpolation to use for movement ```csharp public enum MoveMode ``` ## Remarks Movement is computed according to the movement type with a parametric parameter 't' that varies from zero to one. - Linear movement is directly proportional to 't'. - Ease-in movement is proportional to 't^2'. - Ease-out movement is computed with 't\*(2-t)'. - Smoothstep interpolation uses '(3-2t)\*t^2'. ## Values | Value | Description | |---|---| | `EaseIn` Added in 32.0.0 | Ease In. The object with move slowly at first and quickly at the end. | | `EaseOut` Added in 32.0.0 | Ease Out. The object with move quickly at first and slow down at the end. | | `Linear` Added in 32.0.0 | Linear Interpolation. The object will move at a constant velocity. | | `Smoothstep` Added in 32.0.0 | Smoothstep Interpolation. The object with speed up and slow down smoothly when moving. | ## Used in examples - [MoverExample1.cs](/scripting/examples/mover-examples) - [MoverExample2.cs](/scripting/examples/mover-examples) - [MoverExample3.cs](/scripting/examples/mover-examples) - `MoverExample4.cs` - [ScriptLibrary/Scene/Mover.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Scene/Mover.cs)Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/movemode --- # Mover Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 The Mover handles adding moves to process for an object. ```csharp public class Mover : Sansar.Script.InstanceInterface ``` ## Remarks The Movable From Script flag must be set to true in the editor to use the Mover. Additionally, player characters and rigid bodies with Static or Dynamic motion types cannot be moved using the Mover. Unlike the RigidBodyComponent movement functions, the Mover can be applied to objects that do not contain Volumes. ## Members at a glance | Kind | Members | |---|---| | **Properties** | [IsMoving](#ismoving) · [MoveCount](#movecount) | | **Methods** | [AddMove](#addmove) New in 47.10.0 · [AddMoveOffset](#addmoveoffset) New in 47.10.0 · [AddPause](#addpause) · [AddRotate](#addrotate) · [AddRotateOffset](#addrotateoffset) · [AddTranslate](#addtranslate) · [AddTranslateOffset](#addtranslateoffset) · [StopAndClear](#stopandclear) · [ToString](#tostring) | ## Properties ### IsMovingGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/mover --- # Objective Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 The Objective is the interface for a user's Quest Objective ```csharp public class Objective : Sansar.Script.InstanceInterface ``` ## Members at a glance | Kind | Members | |---|---| | **Properties** | [Agent](#agent) · [Count](#count) · [Definition](#definition) · [Ready](#ready) | | **Methods** | [GetState](#getstate) · [SetState](#setstate) · [Subscribe](#subscribe) · [ToString](#tostring) · [Update](#update) | ## Properties ### AgentGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/objective --- # ObjectiveData Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Handler for Objective state change events. ```csharp public class ObjectiveData : Sansar.Script.EventData ``` ## Members at a glance | Kind | Members | |---|---| | **Properties** | [AgentId](#agentid) · [State](#state) | | **Methods** | [ToString](#tostring) | ## Properties ### AgentIdGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/objectivedata --- # ObjectiveDefinition Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 The ObjectiveDefinition stores the data that is used to create quest objective instances for users. ```csharp public class ObjectiveDefinition : Sansar.Script.InstanceInterface ``` ## Members at a glance | Kind | Members | |---|---| | **Properties** | [Description](#description) · [InitialState](#initialstate) · [Ready](#ready) · [RequiredCount](#requiredcount) · [Title](#title) | | **Methods** | [GetObjective](#getobjective) · [ToString](#tostring) · [Update](#update) | ## Properties ### DescriptionGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/objectivedefinition --- # ObjectiveDefinition.GetObjectiveData Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 ```csharp public class ObjectiveDefinition.GetObjectiveData : Sansar.Script.OperationCompleteEvent ``` ## Members at a glance | Kind | Members | |---|---| | **Properties** | [Objective](#objective) | | **Methods** | [ToString](#tostring) | ## Properties ### ObjectiveGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/objectivedefinition.getobjectivedata --- # ObjectiveState Kind: Enum · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 State of a quest objective for a user. ```csharp public enum ObjectiveState ``` ## Values | Value | Description | |---|---| | `Active` Added in 34.7.0 | The objective is currently active and available to complete for this user. | | `Completed` Added in 34.7.0 | The objective has been completed for this user. | | `Locked` Added in 34.7.0 | The objective is locked for this user and can not be completed. | | `None` Added in 34.7.0 | The objective state is not set, probably the user is not on the quest. | ## Used in examples - [QuestDebugExample.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/QuestDebugExample.cs) - [ScriptLibrary/Quest/QuestGiverInteraction.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Quest/QuestGiverInteraction.cs) - [ScriptLibrary/Quest/QuestGiverTrigger.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Quest/QuestGiverTrigger.cs) - [ScriptLibrary/Quest/QuestObject.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Quest/QuestObject.cs) - [ScriptLibrary/Quest/QuestObjectBase.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Quest/QuestObjectBase.cs) - [ScriptLibrary/Quest/QuestObjectInteraction.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Quest/QuestObjectInteraction.cs) - [ScriptLibrary/Quest/QuestObjectTrigger.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Quest/QuestObjectTrigger.cs) - [ScriptLibrary/Quest/QuestVisibility.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Quest/QuestVisibility.cs)Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/objectivestate --- # ObjectPrivate Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Interface to an object in a [`Cluster`](/scripting/api/sansar.simulation/cluster) in the Scene. ```csharp public class ObjectPrivate : Sansar.Script.InstanceInterface ``` ## Remarks Provides basic information about an object. ## Members at a glance | Kind | Members | |---|---| | **Properties** | [ForwardVector](#forwardvector) · [InitialPosition](#initialposition) · [InitialRotation](#initialrotation) · [IsMovable](#ismovable) · [Mover](#mover) · [Name](#name) · [ObjectId](#objectid) · [Position](#position) · [RightVector](#rightvector) · [Rotation](#rotation) · [UpVector](#upvector) | | **Methods** | [AddInteraction](#addinteraction) · [FindScripts](#findscripts) · [GetComponent](#getcomponent) · [GetComponentCount](#getcomponentcount) · [LookupScripts](#lookupscripts) · [ToString](#tostring) · [TryGetComponent](#trygetcomponent) · [TryGetFirstComponent](#trygetfirstcomponent) | ## Properties ### ForwardVectorGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/objectprivate --- # ObjectPrivate.AddInteractionData Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 The result of AddInteraction request. ```csharp public class ObjectPrivate.AddInteractionData : Sansar.Script.OperationCompleteEvent ``` ## Remarks See [`ObjectPrivate.AddInteraction`](/scripting/api/sansar.simulation/objectprivate#addinteraction-string-boolean-action) ## Members at a glance | Kind | Members | |---|---| | **Properties** | [Interaction](#interaction) | | **Methods** | [ToString](#tostring) | ## Properties ### InteractionGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/objectprivate.addinteractiondata --- # ObjectPublic Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 The ObjectPublic class is a more limited subset of the [`ObjectPrivate`](/scripting/api/sansar.simulation/objectprivate) API for use by other scripts in the scene. ```csharp public class ObjectPublic : Sansar.Script.InstanceInterface ``` ## Remarks [`ObjectPrivate`](/scripting/api/sansar.simulation/objectprivate) has wider access than ObjectPublic. Objects may be removed from the scene at any time. Attempting to use an ObjectPublic interface for an object no longer in the scene will throw a NullReferenceException. ## Members at a glance | Kind | Members | |---|---| | **Properties** | [ForwardVector](#forwardvector) · [InitialPosition](#initialposition) · [InitialRotation](#initialrotation) · [Name](#name) · [ObjectId](#objectid) · [Position](#position) · [RightVector](#rightvector) · [Rotation](#rotation) · [UpVector](#upvector) | | **Methods** | [ToString](#tostring) | ## Properties ### ForwardVectorGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/objectpublic --- # ObjectScript Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Extend SceneObjectScript to create a script that can be used on content that is rezzable in a scene. ```csharp public abstract class ObjectScript : Sansar.Script.ScriptBase ``` ## Remarks ObjectScript scripts on objects will be run when rezzed by other scripts via [`ScenePrivate.CreateCluster`](/scripting/api/sansar.simulation/sceneprivate#createcluster-clusterresource-vector-quaternion-vector-createclusterhandler) Override [`ScriptBase.Init`](/scripting/api/sansar.script/scriptbase#init) for script initialization, primarily event subscriptions. Use [`ObjectScript.ObjectPrivate`](/scripting/api/sansar.simulation/objectscript#objectprivate) to access the Object the script is on. Use [`ObjectScript.ScenePublic`](/scripting/api/sansar.simulation/objectscript#scenepublic) to access the Scene the object is in. ```csharp title="ObjectScriptExample.cs" /* This content is licensed under the terms of the Creative Commons Attribution 4.0 International License. * When using this content, you must: * • Acknowledge that the content is from the Sansar Knowledge Base. * • Include our copyright notice: "© 2022 Sansar, Inc." * • Indicate that the content is licensed under the Creative Commons Attribution-Share Alike 4.0 International License. * • Include the URL for, or link to, the license summary at https://creativecommons.org/licenses/by-sa/4.0/deed.hi (and, if possible, to the complete license terms at https://creativecommons.org/licenses/by-sa/4.0/legalcode. * For example: * "This work uses content from the Sansar Knowledge Base. © 2018 Linden Research, Inc. Licensed under the Creative Commons Attribution 4.0 International License (license summary available at https://creativecommons.org/licenses/by/4.0/ and complete license terms available at https://creativecommons.org/licenses/by/4.0/legalcode)." */ /* Start a coroutine to wait for collision events. * Which types of collisions are handled may be set on the properties panel for * the object when editing the scene. */ using Sansar.Simulation; using Sansar.Script; using System; // To get full access to the Object API a script must extend from ObjectScript public class ObjectScriptExample : ObjectScript { // Components can be set in the editor if the correct component types are added to the object [EditorVisible] private RigidBodyComponent RigidBody = null; [DefaultValue(true)] [DisplayName("Track Avatar Hits")] [EditorVisible] private bool TrackAgentHits = true; [DefaultValue(true)] [DisplayName("Track Object Hits")] [EditorVisible] private bool TrackObjectHits = true; public ObjectScriptExample() { // Script initialization order: // Constructor (this method) // Set base class members (ObjectScript's ExperienceInfo, SceneInfo, and ObjectPrivate) // Set public fields that were configured at edit time (RigidBody, TrackAgentHist, TrackObjectHits) // Init() } // Override Init to set up event handlers and start coroutines. public override void Init() { // When unhandled exceptions occur, they may be caught with this event handler. // Certain exceptions may not be recoverable at all and may cause the script to // immediately be removed. Script.UnhandledException += UnhandledException; // If the object had its components set in the editor they should now have the member initialized // The component can also be found dynamically if (RigidBody == null) { if (!ObjectPrivate.TryGetFirstComponent(out RigidBody)) { // Since object scripts are initialized when the scene loads, no one will actually see this message. ScenePublic.Chat.MessageAllUsers("There is no RigidBodyComponent attached to this object."); return; } } // Convert the supplied bools to the correct CollisionEventType to track CollisionEventType trackedEvents = 0; if (TrackAgentHits) { trackedEvents |= CollisionEventType.CharacterContact; } if (TrackObjectHits) { trackedEvents |= CollisionEventType.RigidBodyContact; } // StartCoroutine will queue CheckForCollisions to run // Arguments after the coroutine method are passed as arguments to the method. StartCoroutine(CheckForCollisions, trackedEvents); } private void CheckForCollisions(CollisionEventType trackedEvents) { while (true) { // This will block the coroutine until a collision happens CollisionData data = (CollisionData)WaitFor(RigidBody.Subscribe, trackedEvents, Sansar.Script.ComponentId.Invalid); if (data.EventType == CollisionEventType.CharacterContact) { ScenePublic.Chat.MessageAllUsers("I hit an avatar!"); } else { ScenePublic.Chat.MessageAllUsers("I hit an object!"); } } } private void UnhandledException(object sender, Exception e) { // Depending on the script scheduling policy, the exception may or may not be recoverable. // An unrecoverable exception that can be handled will only be given a short time to run // so the handler method needs to be kept small. // Any exception thrown from this method will terminate the script regardless of the value // of UnhandledExceptionRecoverable if (!Script.UnhandledExceptionRecoverable) { ScenePublic.Chat.MessageAllUsers("Unrecoverable exception happened, the script will now be removed."); } else { ScenePublic.Chat.MessageAllUsers("This script will be allowed to continue."); } } } ```Source: Examples/ObjectScriptExample.cs in the Sansar 47.10.0 client ScriptApi snapshot.
Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/objectscript --- # PlayHandle Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 The PlayHandle represents audio play handles. ```csharp public class PlayHandle : Sansar.Script.InstanceInterface, IDisposable ``` ## Members at a glance | Kind | Members | |---|---| | **Methods** | [Dispose](#dispose) · [Finalize](#finalize) · [GetLoudness](#getloudness) · [GetPitchShift](#getpitchshift) · [GetRemainingSeconds](#getremainingseconds) · [GetStatus](#getstatus) · [IsPlaying](#isplaying) · [OnFinished](#onfinished) · [SetLoudness](#setloudness) · [SetPitchShift](#setpitchshift) · [Stop](#stop) | ## Methods ### DisposeGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/playhandle --- # PlaySettings Kind: Struct · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 The PlaySettings class contains settings for playing sounds. ```csharp public struct PlaySettings ``` ## Remarks See `AudioComponent.PlaySoundOnComponent` and `AgentPrivate.PlaySound` ## Members at a glance | Kind | Members | |---|---| | **Fields** | [DontSync](#dontsync) · [Looped](#looped) · [Looping](#looping) · [Loudness](#loudness) · [Offset](#offset) · [PitchShift](#pitchshift) · [PlayOnce](#playonce) | ## Fields ### DontSyncGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/playsettings --- # PlayStatus Kind: Enum · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Current status of the PlayStatus. ```csharp public enum PlayStatus ``` ## Values | Value | Description | |---|---| | `cFinishedPlaying` | (one-shots only) Finished playing to the end. | | `cLooping` | Currently looping. | | `cPlayingOnce` | Currently playing once. | | `cStopped` | Was stopped during playback. | | `FinishedPlaying` | (one-shots only) Finished playing to the end. | | `Looping` | Currently looping. | | `PlayingOnce` | Currently playing once. | | `Stopped` | Was stopped during playback. |Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/playstatus --- # Quest Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 The Quest is the interface for a user's progress in a Quest. ```csharp public class Quest : Sansar.Script.InstanceInterface ``` ## Remarks Each instance of Quest is generated from a [`QuestDefinition`](/scripting/api/sansar.simulation/questdefinition) and is associated with a specific user, represented by a [`SessionId`](/scripting/api/sansar.script/sessionid). It can be used to offer the quest to that user, and to track and control their progress through the quest. ## Members at a glance | Kind | Members | |---|---| | **Properties** | [Agent](#agent) · [Definition](#definition) · [Objectives](#objectives) · [Ready](#ready) | | **Methods** | [GetState](#getstate) · [Offer](#offer) · [SetState](#setstate) · [Subscribe](#subscribe) · [ToString](#tostring) · [Update](#update) | ## Properties ### AgentGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/quest --- # QuestCharacter Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 The QuestCharacter is the interface for a Quest Character ```csharp public class QuestCharacter : Sansar.Script.InstanceInterface ``` ## Remarks There is as yet no way to create Quest Characters, but this functionality is coming soon. ## Members at a glance | Kind | Members | |---|---| | **Methods** | [GetCharacterTracker](#getcharactertracker) · [ShowQuests](#showquests) · [TurnInQuests](#turninquests) | ## Methods ### GetCharacterTrackerGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/questcharacter --- # QuestData Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Handler for Quest state change events. ```csharp public class QuestData : Sansar.Script.EventData ``` ## Members at a glance | Kind | Members | |---|---| | **Properties** | [AgentId](#agentid) · [State](#state) | | **Methods** | [ToString](#tostring) | ## Properties ### AgentIdGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/questdata --- # QuestDefinition Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 The QuestDefinition stores the data that is used to create quest instances for users. ```csharp public class QuestDefinition : Sansar.Script.InstanceInterface ``` ## Members at a glance | Kind | Members | |---|---| | **Properties** | [Description](#description) · [ObjectiveDefinitions](#objectivedefinitions) · [Ready](#ready) · [Title](#title) | | **Methods** | [GetQuest](#getquest) · [ToString](#tostring) · [Update](#update) | ## Properties ### DescriptionGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/questdefinition --- # QuestDefinition.GetQuestData Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 ```csharp public class QuestDefinition.GetQuestData : Sansar.Script.OperationCompleteEvent ``` ## Members at a glance | Kind | Members | |---|---| | **Properties** | [Quest](#quest) | | **Methods** | [ToString](#tostring) | ## Properties ### QuestGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/questdefinition.getquestdata --- # QuestState Kind: Enum · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 State of a quest for a user. ```csharp public enum QuestState ``` ## Values | Value | Description | |---|---| | `Active` Added in 34.7.0 | The user is on the quest. | | `Completed` Added in 34.7.0 | The user has completed the quest. | | `None` Added in 34.7.0 | The quest has not yet been offered to the user. | | `ObjectivesCompleted` Added in 36.0.1 | The user has completed all the objectives for this quest. | | `Offered` Added in 34.7.0 | The user has been offered the quest. | | `SelectReward` Added in 36.0.1 | The user has completed all the objectives for this quest, and turned it in, but still has to select rewards | ## Used in examples - [QuestDebugExample.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/QuestDebugExample.cs) - [ScriptLibrary/Quest/QuestGiverBase.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Quest/QuestGiverBase.cs) - [ScriptLibrary/Quest/QuestGiverInteraction.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Quest/QuestGiverInteraction.cs) - [ScriptLibrary/Quest/QuestGiverTrigger.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Quest/QuestGiverTrigger.cs) - [ScriptLibrary/Quest/QuestVisibility.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Quest/QuestVisibility.cs)Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/queststate --- # RagdollRegion Kind: Enum · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Flags for targeting specific ragdoll body regions. Combine with bitwise OR. ```csharp [System.Flags] public enum RagdollRegion ``` ## Remarks When applying impulse to specific regions (e.g. LeftArm \| LeftLeg), the force is distributed only among the bodies in those regions, creating asymmetric effects like spinning falls. ## Values | Value | Description | |---|---| | `AllRegions` Added in 47.1.1 | All regions. | | `Head` Added in 47.1.1 | Head. | | `LeftArm` Added in 47.1.1 | Left arm (shoulder, elbow, wrist). | | `LeftLeg` Added in 47.1.1 | Left leg (hip, knee, ankle). | | `NoRegion` Added in 47.1.1 | No region. | | `RightArm` Added in 47.1.1 | Right arm (shoulder, elbow, wrist). | | `RightLeg` Added in 47.1.1 | Right leg (hip, knee, ankle). | | `Torso` Added in 47.1.1 | Torso (pelvis, spine, neck). |Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/ragdollregion --- # RayCastHit Kind: Struct · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Result of a Raycast. ```csharp public struct RayCastHit ``` ## Members at a glance | Kind | Members | |---|---| | **Fields** | [ComponentId](#componentid) · [Fraction](#fraction) · [Location](#location) · [Normal](#normal) | ## Fields ### ComponentIdGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/raycasthit --- # ReactionData Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Subscribe to receive reaction events from users. ```csharp public class ReactionData : Sansar.Script.EventData ``` ## Members at a glance | Kind | Members | |---|---| | **Properties** | [Orientation](#orientation) · [Position](#position) · [Type](#type) | | **Methods** | [ToString](#tostring) | ## Properties ### OrientationGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/reactiondata --- # Reactions Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 The Reactions class subscriptions to user reaction events. ```csharp public class Reactions : Sansar.Script.InstanceInterface ``` ## Members at a glance | Kind | Members | |---|---| | **Methods** | [AddReaction](#addreaction) · [AddSystemReaction](#addsystemreaction) · [DisableDefaultReactions](#disabledefaultreactions) · [RemoveReaction](#removereaction) · [SubscribeToReaction](#subscribetoreaction) | ## Methods ### AddReactionGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/reactions --- # RenderMaterial Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 The RenderMaterial handles interactions with render materials. ```csharp public class RenderMaterial : Sansar.Script.InstanceInterface ``` ## Members at a glance | Kind | Members | |---|---| | **Properties** | [HasAbsorption](#hasabsorption) · [HasApplyGlobalWind](#hasapplyglobalwind) New in 47.10.0 · [HasApplyUvOffsetToAo](#hasapplyuvoffsettoao) · [HasApplyUvOffsetToDiffuse](#hasapplyuvoffsettodiffuse) · [HasApplyUvOffsetToEmissive](#hasapplyuvoffsettoemissive) · [HasAudioReactAdaptiveDisplacement](#hasaudioreactadaptivedisplacement) · [HasAudioReactAdaptiveFlashEmissive](#hasaudioreactadaptiveflashemissive) · [HasAudioReactDisplacementOnHigh](#hasaudioreactdisplacementonhigh) · [HasAudioReactDisplacementOnLow](#hasaudioreactdisplacementonlow) · [HasAudioReactDisplacementOnMid](#hasaudioreactdisplacementonmid) · [HasAudioReactEmissiveBrightness](#hasaudioreactemissivebrightness) · [HasAudioReactEmissiveColor](#hasaudioreactemissivecolor) · [HasAudioReactFlashEmissiveOnHigh](#hasaudioreactflashemissiveonhigh) · [HasAudioReactFlashEmissiveOnLow](#hasaudioreactflashemissiveonlow) · [HasAudioReactFlashEmissiveOnMid](#hasaudioreactflashemissiveonmid) · [HasAudioReactFlipbookFrame](#hasaudioreactflipbookframe) · [HasBladeDensity](#hasbladedensity) New in 47.10.0 · [HasBladeHeight](#hasbladeheight) New in 47.10.0 · [HasBladeWidth](#hasbladewidth) New in 47.10.0 · [HasBlendDisplacementFlipbook](#hasblenddisplacementflipbook) · [HasBlendOnDisplacementLoop](#hasblendondisplacementloop) · [HasBrightness](#hasbrightness) · [HasDirtRoughness](#hasdirtroughness) New in 47.10.0 · [HasDrawAfterimages](#hasdrawafterimages) · [HasEmissiveIntensity](#hasemissiveintensity) · [HasFlipbookFrame](#hasflipbookframe) · [HasFlipbookIndex](#hasflipbookindex) · [HasFurDensity](#hasfurdensity) New in 47.10.0 · [HasFurLength](#hasfurlength) New in 47.10.0 · [HasFurRootColor](#hasfurrootcolor) New in 47.10.0 · [HasFurThickness](#hasfurthickness) New in 47.10.0 · [HasFurTipColor](#hasfurtipcolor) New in 47.10.0 · [HasGrassDensity](#hasgrassdensity) New in 47.10.0 · [HasGrassDirtColor](#hasgrassdirtcolor) New in 47.10.0 · [HasGrassLength](#hasgrasslength) New in 47.10.0 · [HasGrassRootColor](#hasgrassrootcolor) New in 47.10.0 · [HasGrassThickness](#hasgrassthickness) New in 47.10.0 · [HasGrassTipColor](#hasgrasstipcolor) New in 47.10.0 · [HasGravityStrength](#hasgravitystrength) New in 47.10.0 · [HasLoopDisplacementFlipbook](#hasloopdisplacementflipbook) · [HasLoopFlipbook](#hasloopflipbook) · [HasPingPongDisplacementFlipbook](#haspingpongdisplacementflipbook) · [HasReceiveReflection](#hasreceivereflection) · [HasRenderBlades](#hasrenderblades) New in 47.10.0 · [HasRenderFins](#hasrenderfins) New in 47.10.0 · [HasRenderShells](#hasrendershells) New in 47.10.0 · [HasRoughness](#hasroughness) New in 47.10.0 · [HasScrollAlbedo](#hasscrollalbedo) · [HasScrollAo](#hasscrollao) · [HasScrollDisplacement](#hasscrolldisplacement) · [HasScrollDisplacementFactor](#hasscrolldisplacementfactor) · [HasScrollEmissive](#hasscrollemissive) · [HasScrollMask](#hasscrollmask) · [HasScrollMetalness](#hasscrollmetalness) · [HasScrollNormalRoughness](#hasscrollnormalroughness) · [HasSelfShadowStrength](#hasselfshadowstrength) New in 47.10.0 · [HasShadowCasting](#hasshadowcasting) · [HasShellHeight](#hasshellheight) New in 47.10.0 · [HasTint](#hastint) · [HasUseCustomBladeShape](#hasusecustombladeshape) New in 47.10.0 · [HasVatBlendAnimLoop](#hasvatblendanimloop) · [HasVATFrame](#hasvatframe) · [HasVatLoopAnim](#hasvatloopanim) · [HasVATLoopRunLength](#hasvatlooprunlength) · [HasVATLoopStartFrame](#hasvatloopstartframe) · [HasVatPingPongAnim](#hasvatpingponganim) · [HasVATStepRate](#hasvatsteprate) · [HasWindFlowScale](#haswindflowscale) New in 47.10.0 · [HasWindStrength](#haswindstrength) New in 47.10.0 · [Index](#index) · [Name](#name) · [ShaderType](#shadertype) | | **Methods** | [GetProperties](#getproperties) · [SetProperties](#setproperties) · [ToString](#tostring) | ## Properties ### HasAbsorptionGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/rendermaterial --- # RigidBodyComponent Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 The RigidBodyComponent handles interactions with rigid body physics. ```csharp public class RigidBodyComponent : Sansar.Script.InstanceInterface ``` ## Members at a glance | Kind | Members | |---|---| | **Fields** | [ComponentType](#componenttype) | | **Properties** | [ComponentId](#componentid) · [Name](#name) | | **Methods** | [AddAngularImpulse](#addangularimpulse) · [AddLinearImpulse](#addlinearimpulse) · [GetAngularDamping](#getangulardamping) · [GetAngularVelocity](#getangularvelocity) · [GetBounce](#getbounce) · [GetCanGrab](#getcangrab) · [GetCenterOfMass](#getcenterofmass) · [GetColliderCenter](#getcollidercenter) · [GetColliderExtents](#getcolliderextents) · [GetDynamicFriction](#getdynamicfriction) · [GetGravityFactor](#getgravityfactor) · [GetHeldObjectInfo](#getheldobjectinfo) · [GetInverseInertia](#getinverseinertia) · [GetLinearDamping](#getlineardamping) · [GetLinearVelocity](#getlinearvelocity) · [GetMass](#getmass) · [GetMotionType](#getmotiontype) · [GetOrientation](#getorientation) · [GetPosition](#getposition) · [GetSitObjectInfo](#getsitobjectinfo) · [GetStaticFriction](#getstaticfriction) · [IsDynamic](#isdynamic) · [IsTriggerVolume](#istriggervolume) · [ReleaseHeldObject](#releaseheldobject) · [SetAngularDamping](#setangulardamping) · [SetAngularVelocity](#setangularvelocity) · [SetBounce](#setbounce) · [SetCanGrab](#setcangrab) · [SetCenterOfMass](#setcenterofmass) · [SetDynamicFriction](#setdynamicfriction) · [SetGravityFactor](#setgravityfactor) · [SetInverseInertia](#setinverseinertia) · [SetLinearDamping](#setlineardamping) · [SetLinearVelocity](#setlinearvelocity) · [SetMass](#setmass) · [SetMotionType](#setmotiontype) · [SetOrientation](#setorientation) · [SetPosition](#setposition) · [SetStaticFriction](#setstaticfriction) · [Subscribe](#subscribe) · [SubscribeToHeldObject](#subscribetoheldobject) · [SubscribeToSitObject](#subscribetositobject) · [ToString](#tostring) | ## Fields ### ComponentTypeGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/rigidbodycomponent --- # RigidBodyComponent.SubscriptionHandler Kind: Delegate · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Handler for rigid body events. ```csharp [System.Obsolete("Use subscription callbacks of type ActionGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/rigidbodycomponent.subscriptionhandler --- # RigidBodyMotionType Kind: Enum · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Type of motion that can be applied to a rigid body. ```csharp public enum RigidBodyMotionType ``` ## Values | Value | Description | |---|---| | `MotionTypeDynamic` | Dynamic. This object is fully affected by the physics simulation. | | `MotionTypeKeyframed` | Keyframed. This object has its position and velocity directly controlled by scripts. | | `MotionTypeStatic` | Static. This object never moves. | ## Used in examples - [MoverExample1.cs](/scripting/examples/mover-examples) - [ScriptLibrary/Scene/Dispenser.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Scene/Dispenser.cs) - [ScriptLibrary/Scene/KeyframedMotion.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Scene/KeyframedMotion.cs) - [ScriptLibrary/Scene/PositionReset.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Scene/PositionReset.cs)Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/rigidbodymotiontype --- # SceneInfo Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Information about a Scene. ```csharp public class SceneInfo : Sansar.Script.InstanceInterface ``` ## Remarks Provides read only access to Scene information. ## Members at a glance | Kind | Members | |---|---| | **Fields** | [ApiVersion](#apiversion) · [ApiVersionString](#apiversionstring) | | **Properties** | [AccessGroup](#accessgroup) · [AvatarId](#avatarid) · [AvatarUuid](#avataruuid) · [BuildId](#buildid) · [CompatVersion](#compatversion) · [Configuration](#configuration) · [EventId](#eventid) · [ExperienceId](#experienceid) · [ExperienceName](#experiencename) · [InstanceId](#instanceid) · [InstanceRole](#instancerole) · [LocationHandle](#locationhandle) · [MaxUsers](#maxusers) · [ProtoVersion](#protoversion) · [SansarUri](#sansaruri) | | **Methods** | [ToString](#tostring) | ## Fields ### ApiVersionGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/sceneinfo --- # SceneObjectScript Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Extend 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. ```csharp public abstract class SceneObjectScript : Sansar.Script.ScriptBase ``` ## Remarks Override [`ScriptBase.Init`](/scripting/api/sansar.script/scriptbase#init) for script initialization, primarily event subscriptions. Use [`SceneObjectScript.ObjectPrivate`](/scripting/api/sansar.simulation/sceneobjectscript#objectprivate) to access the Object the script is on. Use [`SceneObjectScript.ScenePrivate`](/scripting/api/sansar.simulation/sceneobjectscript#sceneprivate) to access the Scene the object is in. ```csharp title="SceneObjectScriptExample.cs" /* This content is licensed under the terms of the Creative Commons Attribution 4.0 International License. * When using this content, you must: * • Acknowledge that the content is from the Sansar Knowledge Base. * • Include our copyright notice: "© 2022 Sansar, Inc." * • Indicate that the content is licensed under the Creative Commons Attribution-Share Alike 4.0 International License. * • Include the URL for, or link to, the license summary at https://creativecommons.org/licenses/by-sa/4.0/deed.hi (and, if possible, to the complete license terms at https://creativecommons.org/licenses/by-sa/4.0/legalcode. * For example: * "This work uses content from the Sansar Knowledge Base. © 2018 Linden Research, Inc. Licensed under the Creative Commons Attribution 4.0 International License (license summary available at https://creativecommons.org/licenses/by/4.0/ and complete license terms available at https://creativecommons.org/licenses/by/4.0/legalcode)." */ /* Start a coroutine to wait for collision events. * Which types of collisions are handled may be set on the properties panel for * the object when editing the scene. */ using Sansar.Simulation; using Sansar.Script; using System; // To get full access to the Object API a script must extend from ObjectScript public class SceneObjectScriptExample : SceneObjectScript { // Components can be set in the editor if the correct component types are added to the object [EditorVisible] private RigidBodyComponent RigidBody = null; [DefaultValue(true)] [DisplayName("Track Avatar Hits")] [EditorVisible] private bool TrackAgentHits = true; [DefaultValue(true)] [DisplayName("Track Object Hits")] [EditorVisible] private bool TrackObjectHits = true; public SceneObjectScriptExample() { // Script initialization order: // Constructor (this method) // Set base class members (ObjectScript's ExperienceInfo, SceneInfo, and ObjectPrivate) // Set public fields that were configured at edit time (RigidBody, TrackAgentHist, TrackObjectHits) // Init() } // Override Init to set up event handlers and start coroutines. public override void Init() { // When unhandled exceptions occur, they may be caught with this event handler. // Certain exceptions may not be recoverable at all and may cause the script to // immediately be removed. Script.UnhandledException += UnhandledException; // If the object had its components set in the editor they should now have the member initialized // The component can also be found dynamically if (RigidBody == null) { if (!ObjectPrivate.TryGetFirstComponent(out RigidBody)) { // Since object scripts are initialized when the scene loads, no one will actually see this message. ScenePrivate.Chat.MessageAllUsers("There is no RigidBodyComponent attached to this object."); return; } } // Convert the supplied bools to the correct CollisionEventType to track CollisionEventType trackedEvents = 0; if (TrackAgentHits) { trackedEvents |= CollisionEventType.CharacterContact; } if (TrackObjectHits) { trackedEvents |= CollisionEventType.RigidBodyContact; } // StartCoroutine will queue CheckForCollisions to run // Arguments after the coroutine method are passed as arguments to the method. StartCoroutine(CheckForCollisions, trackedEvents); } private void CheckForCollisions(CollisionEventType trackedEvents) { while (true) { // This will block the coroutine until a collision happens CollisionData data = (CollisionData)WaitFor(RigidBody.Subscribe, trackedEvents, Sansar.Script.ComponentId.Invalid); if (data.EventType == CollisionEventType.CharacterContact) { ScenePrivate.Chat.MessageAllUsers("I hit an avatar!"); } else { ScenePrivate.Chat.MessageAllUsers("I hit an object!"); } } } private void UnhandledException(object sender, Exception e) { // Depending on the script scheduling policy, the exception may or may not be recoverable. // An unrecoverable exception that can be handled will only be given a short time to run // so the handler method needs to be kept small. // Any exception thrown from this method will terminate the script regardless of the value // of UnhandledExceptionRecoverable if (!Script.UnhandledExceptionRecoverable) { ScenePrivate.Chat.MessageAllUsers("Unrecoverable exception happened, the script will now be removed."); } else { ScenePrivate.Chat.MessageAllUsers("This script will be allowed to continue."); } } } ```Source: Examples/SceneObjectScriptExample.cs in the Sansar 47.10.0 client ScriptApi snapshot.
Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/sceneobjectscript --- # ScenePrivate Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Interface for Scripts that are part of a Scene. A more complete and less limited API than [`ScenePublic`](/scripting/api/sansar.simulation/scenepublic) ```csharp public class ScenePrivate : Sansar.Script.InstanceInterface ``` ## Remarks The ScenePrivate class provides services relating to the Scene. ## Members at a glance | Kind | Members | |---|---| | **Fields** | [GravityMaximum](#gravitymaximum) · [GravityMinimum](#gravityminimum) · [MaximumCastRayResults](#maximumcastrayresults) · [MinimumCastRadius](#minimumcastradius) | | **Properties** | [AgentCount](#agentcount) · [Chat](#chat) · [DefaultGravity](#defaultgravity) · [HttpClient](#httpclient) · [Reactions](#reactions) · [SceneInfo](#sceneinfo) · [User](#user) | | **Methods** | [AddToSceneLibrary](#addtoscenelibrary) · [AddToSceneLibraryForAgent](#addtoscenelibraryforagent) · [CastBox](#castbox) · [CastCapsule](#castcapsule) · [CastRay](#castray) · [CastSphere](#castsphere) · [ClearAllowFlightOverrideForAgent](#clearallowflightoverrideforagent) New in 47.10.0 · [ClearAllowFlightOverrides](#clearallowflightoverrides) New in 47.10.0 · [ClearColorLut](#clearcolorlut) New in 47.10.0 · [ClearColorLutOverrideForAgent](#clearcolorlutoverrideforagent) New in 47.10.0 · [ClearColorLutOverrides](#clearcolorlutoverrides) New in 47.10.0 · [ClearSceneLibrary](#clearscenelibrary) · [ClearSceneLibraryForAgent](#clearscenelibraryforagent) · [CreateCluster](#createcluster) · [CreateDataStore](#createdatastore) · [FindAgent](#findagent) · [FindObject](#findobject) · [FindReflective](#findreflective) · [FindScript](#findscript) · [GetAgent](#getagent) · [GetAgents](#getagents) · [GetAllowFlight](#getallowflight) New in 47.10.0 · [GetBoxClosestPoints](#getboxclosestpoints) · [GetCapsuleClosestPoints](#getcapsuleclosestpoints) · [GetGravity](#getgravity) · [GetPortalCreatorName](#getportalcreatorname) · [GetPortalDescription](#getportaldescription) · [GetPortalUri](#getportaluri) · [GetSphereClosestPoints](#getsphereclosestpoints) · [GetTimeOfDay](#gettimeofday) New in 47.10.0 · [GetTimeOfDayMode](#gettimeofdaymode) New in 47.10.0 · [OverrideAudioStream](#overrideaudiostream) · [OverrideIndexedMediaSource](#overrideindexedmediasource) · [OverrideMediaSource](#overridemediasource) · [PerformIndexedMediaAction](#performindexedmediaaction) · [PerformMediaAction](#performmediaaction) · [PlaySound](#playsound) · [PlaySoundAtPosition](#playsoundatposition) · [PlayStream](#playstream) · [PlayStreamAtPosition](#playstreamatposition) · [RemoveFromSceneLibrary](#removefromscenelibrary) · [RemoveFromSceneLibraryForAgent](#removefromscenelibraryforagent) · [ResetScene](#resetscene) · [SetAllowFlight](#setallowflight) New in 47.10.0 · [SetColorLut](#setcolorlut) New in 47.10.0 · [SetGravity](#setgravity) · [SetMegaphone](#setmegaphone) · [SetTimeOfDay](#settimeofday) New in 47.10.0 · [SetTimeOfDayMode](#settimeofdaymode) New in 47.10.0 · [ShakeCameraAtPosition](#shakecameraatposition) New in 47.10.0 · [StopAllCameraShakes](#stopallcamerashakes) New in 47.10.0 · [ToString](#tostring) · [VoiceBroadcastStart](#voicebroadcaststart) · [VoiceBroadcastStop](#voicebroadcaststop) · [VoiceBroadcastStopAll](#voicebroadcaststopall) | ## Fields ### GravityMaximumSource: Examples/CameraShakeExample.cs in the Sansar 47.10.0 client ScriptApi snapshot.
Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/sceneprivate --- # ScenePrivate.CreateClusterData Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 The result of a create cluster request. ```csharp public class ScenePrivate.CreateClusterData : Sansar.Script.OperationCompleteEvent ``` ## Remarks See [`ScenePrivate.CreateCluster`](/scripting/api/sansar.simulation/sceneprivate#createcluster-clusterresource-vector-quaternion-vector-action). ## Members at a glance | Kind | Members | |---|---| | **Properties** | [ClusterReference](#clusterreference) | | **Methods** | [ToString](#tostring) | ## Properties ### ClusterReferenceGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/sceneprivate.createclusterdata --- # ScenePrivate.CreateClusterHandler Kind: Delegate · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Handler for CreateCluster ```csharp [System.Obsolete("Deprecated. Use the Action<> overload", false)] public delegate void ScenePrivate.CreateClusterHandler( bool Success, string Message, Cluster ClusterReference ) ``` | Parameter | Type | Description | |---|---|---| | `Success` | [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Indicates if the operation was successful | | `Message` | [string](https://learn.microsoft.com/dotnet/api/system.string) | Additional information about the result, usually null or empty if Success is true. | | `ClusterReference` | [Cluster](/scripting/api/sansar.simulation/cluster) | The cluster object which was created as a result of the create call.Will be null if Success is false. | ## Remarks Will be null if Success is false.Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/sceneprivate.createclusterhandler --- # ScenePublic Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 The Public Scene API, a more limited subset of [`ScenePrivate`](/scripting/api/sansar.simulation/sceneprivate). ```csharp public class ScenePublic : Sansar.Script.InstanceInterface ``` ## Members at a glance | Kind | Members | |---|---| | **Properties** | [AgentCount](#agentcount) · [Chat](#chat) · [SceneInfo](#sceneinfo) · [User](#user) | | **Methods** | [FindAgent](#findagent) · [FindObject](#findobject) · [FindReflective](#findreflective) · [GetAgent](#getagent) · [GetAgents](#getagents) · [GetPortalCreatorName](#getportalcreatorname) · [GetPortalDescription](#getportaldescription) · [GetPortalUri](#getportaluri) · [ToString](#tostring) | ## Properties ### AgentCountGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/scenepublic --- # ScriptCameraControlMode Kind: Enum · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Type of control mode to use for a script camera. ```csharp public enum ScriptCameraControlMode ``` ## Values | Value | Description | |---|---| | `AgentControlOnly` Added in 37.0.0 | The agent will move and respond to user input. | | `CameraControlOnly` Added in 37.0.0 | The camera will move and respond to user input (Rotation only). | | `FullControl` Added in 37.0.0 | Both agent and camera will respond to user input. | | `NoControl` Added in 37.0.0 | No control. Agent and camera will ignore user input. | ## Used in examples - `CameraShakeExample.cs` - [ScriptLibrary/Scene/Screenshot.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Scene/Screenshot.cs)Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/scriptcameracontrolmode --- # SimpleScript Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Extend 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. ```csharp [System.Obsolete("SimpleScript is deprecated and will not receive new features. Please use SceneObjectScript or ObjectScript.", true)] public abstract class SimpleScript : Sansar.Script.ScriptBase ``` ## Remarks Use [`SimpleScript.ObjectPrivate`](/scripting/api/sansar.simulation/simplescript#objectprivate) to access the Object the script is on. Use [`SimpleScript.ScenePrivate`](/scripting/api/sansar.simulation/simplescript#sceneprivate) to access the Scene the object is in. Override [`SimpleScript.OnAddUser`](/scripting/api/sansar.simulation/simplescript#onadduser) to handle AddUser events. Override [`SimpleScript.OnRemoveUser`](/scripting/api/sansar.simulation/simplescript#onremoveuser) to handle AddUser events. ```csharp protected override OnRemoveUser(AgentInfo agent) { Log.Write($"{agent.Name} has left the region."); } ``` Override [`SimpleScript.OnTimer`](/scripting/api/sansar.simulation/simplescript#ontimer) to do something at regular intervals. ```csharp protected override OnTimer() { RigidBodyComponent?.SetPosition(ObjectPrivate?.InitialPosition); } ``` Override [`SimpleScript.OnChat`](/scripting/api/sansar.simulation/simplescript#onchat) to handle Chat events when users or scripts chat. ```csharp protected override OnChat(ChatData data) { AgentPrivate agent = ScenePrivate.FindAgent(data.SourceId); if (agent != null && agent.AgentInfo.AvatarUuid == ScenePrivate.SceneInfo.AvatarUuid)) { Log.Write($"Scene owner {agent.AgentInfo.Name} said {data.Message}"); } } ``` Override [`SimpleScript.OnCollision`](/scripting/api/sansar.simulation/simplescript#oncollision) to handle Collision events with the object this script is on. ```csharp protected override OnCollision(CollisionData data) { Log.Write($"Bumped {data.HitObject.ObjectId}"); } ``` Override [`SimpleScript.OnScriptEvent`](/scripting/api/sansar.simulation/simplescript#onscriptevent) to handle ScriptEvent events from other scripts. ```csharp protected override OnScriptEvent(AgentPrivate agent) { ISimpleScriptEvent simple = data.Data.AsSource: Examples/SimpleScriptExample.cs in the Sansar 47.10.0 client ScriptApi snapshot.
Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/simplescript --- # SimpleScript.OnAddUserOptionsAttribute Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0This type is documented in the client, but it is not in the reference assemblies that scripts compile against. Scripts may not be able to use it.
Use to create additional OnAddUser subscriptions ```csharp protected class SimpleScript.OnAddUserOptionsAttribute : SimpleScript.SimpleScriptOptionsAttribute ``` ## Remarks This is provided for consistency only. There are no options that can be set and multiple subscriptions would receive all the same events. ## Members at a glance | Kind | Members | |---|---| | **Constructors** | [OnAddUserOptionsAttribute](#onadduseroptionsattribute) | ## Constructors ### OnAddUserOptionsAttributeGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/simplescript.onadduseroptionsattribute --- # SimpleScript.OnChatOptionsAttribute Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Set options for OnChat() overrides, or use to create more simple chat handlers. ```csharp [System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=true)] [System.Obsolete("SimpleScript is deprecated and will not receive new features. Please use SceneObjectScript or ObjectScript.", false)] protected class SimpleScript.OnChatOptionsAttribute : SimpleScript.SimpleScriptOptionsAttribute ``` ## Remarks This attribute is optional when overriding OnChat which by default will respond to all chat on the default channel (Chat.DefaultChannel) and all sources. Add this attribute to any method that matches Action<ChatData> to create extra chat event subscriptions. ```csharp [OnChatOptions(Channel=5)] void ChatFrom5(ChatData data) { // chat from channel 5. } void OnChat(ChatData data) { // chat from the default channel (0) } ``` ## Example ```csharp // Only listen for chat on Channel 10 from scripts. [OnChatOptions(Channel=10, Source="script")] protected override OnChat(ChatData data) ``` ## Members at a glance | Kind | Members | |---|---| | **Constructors** | [OnChatOptionsAttribute](#onchatoptionsattribute) | | **Properties** | [Channel](#channel) · [Source](#source) | ## Constructors ### OnChatOptionsAttributeGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/simplescript.onchatoptionsattribute --- # SimpleScript.OnCollisionOptionsAttribute Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Set options for OnCollision events, or use to create more simple collision handlers. ```csharp [System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false)] [System.Obsolete("SimpleScript is deprecated and will not receive new features. Please use SceneObjectScript or ObjectScript.", false)] protected class SimpleScript.OnCollisionOptionsAttribute : SimpleScript.SimpleScriptOptionsAttribute ``` ## Remarks This attribute is optional when overriding OnCollision which by default will respond to [`CollisionEventType.AllCollisions`](/scripting/api/sansar.simulation/collisioneventtype#F:Sansar.Simulation.CollisionEventType.AllCollisions). Add this attribute to any method that matches Action<CollisionData> to create extra collision event subscriptions. ```csharp [OnCollisionOptions(EventType=CollisionEventType.CharacterContact)] void CharacterCollisionsOnly(CollisionData data) { // character collisions. } void OnCollision(CollisionData data) { // all collisions (including character) } ``` ## Example ```csharp // Only receive events for collisions with users [OnCollisionOptions(EventType=CollisionEventType.CharacterContact] protected override OnCollision(CollisionData data) ``` ## Members at a glance | Kind | Members | |---|---| | **Constructors** | [OnCollisionOptionsAttribute](#oncollisionoptionsattribute) | | **Properties** | [EventType](#eventtype) | ## Constructors ### OnCollisionOptionsAttributeGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/simplescript.oncollisionoptionsattribute --- # SimpleScript.OnRemoveUserOptionsAttribute Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0This type is documented in the client, but it is not in the reference assemblies that scripts compile against. Scripts may not be able to use it.
Use to create additional OnRemoveUser subscriptions ```csharp protected class SimpleScript.OnRemoveUserOptionsAttribute : SimpleScript.SimpleScriptOptionsAttribute ``` ## Remarks This is provided for consistency only. There are no options that can be set and multiple subscriptions would receive all the same events. ## Members at a glance | Kind | Members | |---|---| | **Constructors** | [OnRemoveUserOptionsAttribute](#onremoveuseroptionsattribute) | ## Constructors ### OnRemoveUserOptionsAttributeGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/simplescript.onremoveuseroptionsattribute --- # SimpleScript.OnScriptEventOptionsAttribute Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Set options for OnScriptEvent events. ```csharp [System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false)] [System.Obsolete("SimpleScript is deprecated and will not receive new features. Please use SceneObjectScript or ObjectScript.", false)] protected class SimpleScript.OnScriptEventOptionsAttribute : SimpleScript.SimpleScriptOptionsAttribute ``` ## Remarks If EventName is not set then OnScriptEvent will receive events with the name of the script class. ## Example ```csharp // Send events to this handler from other simple scripts with: PostScriptEvent("AddPosition", myVector); [OnScriptEventOptions(EventName="AddPosition")] protected override void OnScriptEvent(object eventData) { Vector newPos = eventData as Vector; if (newPos != null) AllPositions.Add(newPos); } ``` ## Members at a glance | Kind | Members | |---|---| | **Constructors** | [OnScriptEventOptionsAttribute](#onscripteventoptionsattribute) | | **Properties** | [Message](#message) | ## Constructors ### OnScriptEventOptionsAttributeGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/simplescript.onscripteventoptionsattribute --- # SimpleScript.OnTimerOptionsAttribute Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Set options for OnTimer() overrides, or use to create more simple timers. ```csharp [System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false)] [System.Obsolete("SimpleScript is deprecated and will not receive new features. Please use SceneObjectScript or ObjectScript.", false)] protected class SimpleScript.OnTimerOptionsAttribute : SimpleScript.SimpleScriptOptionsAttribute ``` ## Remarks This attribute is optional when overriding OnTimer which by default will run once per second. Add this attribute to any method that matches Action<> to create extra timers. ```csharp [OnTimerOptions(Rate=5)] void TimerEvery5() { // run every 5 seconds } void OnTimer() { // run every 1 second } ``` ## Example ```csharp // Run this timer every 5 seconds [OnTimerOptions(Rate=5)] protected override OnTimer() ``` ## Members at a glance | Kind | Members | |---|---| | **Constructors** | [OnTimerOptionsAttribute](#ontimeroptionsattribute) | | **Fields** | [MinimumRate](#minimumrate) | | **Properties** | [Rate](#rate) | ## Constructors ### OnTimerOptionsAttributeGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/simplescript.ontimeroptionsattribute --- # SimpleScript.SimpleScriptOptionsAttribute Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Internal Use Only ```csharp protected abstract class SimpleScript.SimpleScriptOptionsAttribute : Attribute ``` ## Members at a glance | Kind | Members | |---|---| | **Constructors** | [SimpleScriptOptionsAttribute](#simplescriptoptionsattribute) | ## Constructors ### SimpleScriptOptionsAttributeGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/simplescript.simplescriptoptionsattribute --- # SitEventType Kind: Enum · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Type of sit event. ```csharp [System.Flags] public enum SitEventType ``` ## Values | Value | Description | |---|---| | `All` | All sit event types. | | `End` | Player avatar stands after sitting on object. | | `Start` | Player avatar starts sitting on object | ## Used in examples - [ScriptLibrary/Scene/SitStand.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Scene/SitStand.cs)Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/siteventtype --- # SitObjectData Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Handler for agent sit events. ```csharp public class SitObjectData : Sansar.Script.EventData ``` ## Members at a glance | Kind | Members | |---|---| | **Properties** | [ComponentId](#componentid) · [ObjectId](#objectid) · [SitObjectEvent](#sitobjectevent) · [SitObjectInfo](#sitobjectinfo) | | **Methods** | [ToString](#tostring) | ## Properties ### ComponentIdGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/sitobjectdata --- # SitObjectInfo Kind: Struct · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Information about if an agent is sitting on this SitObjectInfo. ```csharp public struct SitObjectInfo ``` ## Members at a glance | Kind | Members | |---|---| | **Fields** | [ExitForward](#exitforward) · [ExitPosition](#exitposition) · [IsOccupied](#isoccupied) · [LocalForward](#localforward) · [LocalPosition](#localposition) · [SessionId](#sessionid) | ## Fields ### ExitForwardGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/sitobjectinfo --- # SoundResource Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 The SoundResource class represents a sound that could be added to the scene. ```csharp public class SoundResource : Sansar.Script.InstanceInterface ``` ## Members at a glance | Kind | Members | |---|---| | **Methods** | [GetDurationInSeconds](#getdurationinseconds) · [GetName](#getname) | ## Methods ### GetDurationInSecondsGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/soundresource --- # StreamChannel Kind: Enum · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 For playing a stream from the scene. ```csharp public enum StreamChannel ``` ## Values | Value | Description | |---|---| | `AudioChannel` | Audio Stream 1. See Scene Settings in Layout Editor for the URL. | | `MediaChannel` | The Media Surface. See Scene Settings in Layout Editor for the URL. | | `MediaChannel2` Added in 46.5.0 | Media Surface 2. See Scene Settings in Layout Editor for the URL. | | `MediaChannel3` Added in 46.5.0 | Media Surface 3. See Scene Settings in Layout Editor for the URL. | | `MediaChannel4` Added in 46.5.0 | Media Surface 4. See Scene Settings in Layout Editor for the URL. | ## Used in examples - [ScriptLibrary/Scene/AudioStream.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Scene/AudioStream.cs)Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/streamchannel --- # TextureResource Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 The TextureResource class represents a texture from the inventory, such as a color LUT. See [`ScenePrivate.SetColorLut`](/scripting/api/sansar.simulation/sceneprivate#setcolorlut-textureresource). ```csharp public class TextureResource : Sansar.Script.InstanceInterface ``` ## Remarks Set as a script property, the texture is chosen from the inventory in the scene editor. The server never loads the texture data; only the clients that apply it do. ## Members at a glance | Kind | Members | |---|---| | **Properties** | [ResourceId](#resourceid) New in 47.10.0 | | **Methods** | [ToString](#tostring) New in 47.10.0 | ## Properties ### ResourceIdGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/textureresource --- # ThumbnailedClusterResource Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 The ThumbnailedClusterResource class represents a cluster that has properties to be shown in the UI. ```csharp public class ThumbnailedClusterResource : Sansar.Script.InstanceInterface ``` ## Members at a glance | Kind | Members | |---|---| | **Properties** | [ClusterResource](#clusterresource) | | **Methods** | [ToString](#tostring) | ## Properties ### ClusterResourceGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/thumbnailedclusterresource --- # TimeOfDayMode Kind: Enum · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 How a scene's time of day runs. ```csharp public enum TimeOfDayMode ``` ## Remarks See [`ScenePrivate.GetTimeOfDayMode`](/scripting/api/sansar.simulation/sceneprivate#gettimeofdaymode) and [`ScenePrivate.SetTimeOfDayMode`](/scripting/api/sansar.simulation/sceneprivate#settimeofdaymode-timeofdaymode). ## Values | Value | Description | |---|---| | `Cycle` New in 47.10.0 | The clock runs. A full day takes the day length chosen in the scene settings. | | `Fixed` New in 47.10.0 | The sun is held at the set time of day. | | `Off` New in 47.10.0 | The scene as authored. The sun stays where its light points and the time of day has no effect. | ## Used in examples - `TimeOfDayExample.cs`Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/timeofdaymode --- # TutorialHint Kind: Enum · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Tutorial hint types. ```csharp public enum TutorialHint ``` ## Values | Value | Description | |---|---| | `BackpackHint` Added in 40.0.0 | Open Backpack hint. | | `ClearHint` Added in 32.0.0 | No Tutorial hint. | | `CodexHint` Added in 36.8.0 | Open Codex hint. | | `DropStickyHint` Added in 32.0.0 | Drop sticky held object hint. | | `EmoteHint` Added in 40.0.0 | Open Emote hint. | | `GrabHint` Added in 32.0.0 | Grab Object input hint. | | `InteractionHint` Added in 32.0.0 | Interaction hint. | | `MicrophoneToggleHint` Added in 32.0.0 | Enable/Disable microphone menu hint. | | `PrimePortalHint` Added in 36.8.0 | Use Prime Portal hint. | | `StoreHint` Added in 40.4.0 | Open Store hint. | | `StyleAvatarHint` Added in 32.0.0 | Go to Avatar customization menu hint. | | `TeleportHint` Added in 32.0.0 | Teleport input hint. | | `WalkHint` Added in 32.0.0 | Walk input hint. | | `WalkRunToggleHint` Added in 32.0.0 | Walk/Run toggle input hint. |Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/tutorialhint --- # TwitchData Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Twitch events are generated in response to twitch stream interaction. ```csharp public class TwitchData : Sansar.Script.EventData ``` ## Members at a glance | Kind | Members | |---|---| | **Properties** | [EventType](#eventtype) · [Intensity](#intensity) · [SessionId](#sessionid) | | **Methods** | [ToString](#tostring) | ## Properties ### EventTypeGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/twitchdata --- # TwitchEventType Kind: Enum · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Enumerates the types of twitch events that scripts can subscribe to. ```csharp [System.Flags] public enum TwitchEventType ``` ## Values | Value | Description | |---|---| | `AllEvents` Added in 38.1.0 | Viewer Love event | | `ViewerLove` Added in 38.1.0 | Viewer Love event | ## Used in examples - [TwitchEventExample.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/TwitchEventExample.cs)Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/twitcheventtype --- # UI Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Manages the client UI. ```csharp public class UI : Sansar.Script.InstanceInterface ``` ## Remarks The client UI can be used to send messages that appear in a client UI. ## Members at a glance | Kind | Members | |---|---| | **Properties** | [HintText](#hinttext) · [Menu](#menu) · [ModalDialog](#modaldialog) | | **Methods** | [AddProgressBar](#addprogressbar) · [AddScoreBoard](#addscoreboard) · [CloseDetailView](#closedetailview) · [GetProgressBars](#getprogressbars) · [GetScoreBoards](#getscoreboards) · [OpenDetailViewForUri](#opendetailviewforuri) · [ToString](#tostring) | ## Properties ### HintTextGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/ui --- # UIMenu Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Manages a clickable on-screen menu UI element. ```csharp public class UIMenu : Sansar.Script.InstanceInterface ``` ## Remarks Use this for text-heavy game menus, voting prompts, settings panels, or non-interactive leaderboards. ## Members at a glance | Kind | Members | |---|---| | **Fields** | [cMaxItems](#cmaxitems) | | **Properties** | [Footer](#footer) · [SelectedIndex](#selectedindex) · [SelectedItem](#selecteditem) · [Subtitle](#subtitle) · [Title](#title) | | **Methods** | [Hide](#hide) · [Show](#show) · [ShowStyled](#showstyled) · [ToString](#tostring) | ## Fields ### cMaxItemsGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/uimenu --- # UIProgressBar Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Manages a progress bar UI element. ```csharp public class UIProgressBar : Sansar.Script.InstanceInterface ``` ## Remarks Used for progress bars on interactions. ## Members at a glance | Kind | Members | |---|---| | **Properties** | [Id](#id) · [Label](#label) | | **Methods** | [Cancel](#cancel) · [Start](#start) · [ToString](#tostring) | ## Properties ### IdGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/uiprogressbar --- # UIScoreBoard Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Manages a score board HUD element. ```csharp public class UIScoreBoard : Sansar.Script.InstanceInterface ``` ## Remarks Used for competative games. ## Members at a glance | Kind | Members | |---|---| | **Properties** | [Id](#id) · [Score0](#score0) · [Score1](#score1) | | **Methods** | [Paint](#paint) · [ToString](#tostring) | ## Properties ### IdGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/uiscoreboard --- # User Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 The User class handles interactions user logins and logoffs. ```csharp public class User : Sansar.Script.InstanceInterface ``` ## Members at a glance | Kind | Members | |---|---| | **Fields** | [AddUser](#adduser) · [RemoveUser](#removeuser) | | **Methods** | [Subscribe](#subscribe) | ## Fields ### AddUserGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/user --- # User.SubscriptionHandler Kind: Delegate · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Subscribe to receive events when users enter or leave the experience, or change their chat name. ```csharp [System.Obsolete("Use subscription callbacks of type ActionGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/user.subscriptionhandler --- # UserData Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0 Subscribe to receive events when users enter or leave the experience. ```csharp public class UserData : Sansar.Script.EventData ``` ## Members at a glance | Kind | Members | |---|---| | **Properties** | [Action](#action) · [Data](#data) · [User](#user) | | **Methods** | [ToString](#tostring) | ## Properties ### ActionGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.simulation/userdata --- # Sansar.Utility > Types in the Sansar.Utility namespace. Generic collections and JSON serialization helpers. | Type | Kind | Summary | |---|---|---| | [GenericEnumerable<T>](/scripting/api/sansar.utility/genericenumerable-1) | Class | The GenericEnumerable takes a delegate which accesses items in a Array-like collection by index and allows iteration through enumeration. | | [GenericEnumerable<T>.GetItem](/scripting/api/sansar.utility/genericenumerable-1.getitem) | Delegate | Delegate which returns an item by index. | | [JsonSerializationData](/scripting/api/sansar.utility/jsonserializationdata) | Class | The result of a serialization request. | | [JsonSerializationData<T>](/scripting/api/sansar.utility/jsonserializationdata-1) | Class | The result of a serialization request. | | [JsonSerializer](/scripting/api/sansar.utility/jsonserializer) | Class | Converts objects to and from javascript object notation strings | | [JsonSerializerOptions](/scripting/api/sansar.utility/jsonserializeroptions) | Struct | Options which control the serialization and deserialization process |Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.utility --- # GenericEnumerableGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.utility/genericenumerable-1 --- # GenericEnumerableGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.utility/genericenumerable-1.getitem --- # JsonSerializationData Kind: Class · Namespace: Sansar.Utility · Assembly: Sansar.Script.dll · Script API 47.10.0 The result of a serialization request. ```csharp public class JsonSerializationData : Sansar.Script.OperationCompleteEvent ``` ## Members at a glance | Kind | Members | |---|---| | **Constructors** | [JsonSerializationData](#jsonserializationdata) | | **Properties** | [JsonString](#jsonstring) · [Object](#object) | ## Constructors ### JsonSerializationDataNo description in the API snapshot.
Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.utility/jsonserializationdata --- # JsonSerializationDataNo description in the API snapshot.
Generated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.utility/jsonserializationdata-1 --- # JsonSerializer Kind: Class · Namespace: Sansar.Utility · Assembly: Sansar.Script.dll · Script API 47.10.0 Converts objects to and from javascript object notation strings ```csharp public static class JsonSerializer ``` ## Members at a glance | Kind | Members | |---|---| | **Methods** | [Deserialize](#deserialize) · [Serialize](#serialize) | ## Methods ### DeserializeGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.utility/jsonserializer --- # JsonSerializerOptions Kind: Struct · Namespace: Sansar.Utility · Assembly: Sansar.Script.dll · Script API 47.10.0 Options which control the serialization and deserialization process ```csharp public struct JsonSerializerOptions ``` ## Members at a glance | Kind | Members | |---|---| | **Properties** | [SerializeReferences](#serializereferences) | ## Properties ### SerializeReferencesGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar.utility/jsonserializeroptions --- # Color Kind: Struct · Namespace: Sansar · Assembly: Sansar.Script.dll · Script API 47.10.0 The Color class holds RGBA values that define a color. ```csharp public struct Color ``` ## Members at a glance | Kind | Members | |---|---| | **Constructors** | [Color](#color) | | **Fields** | [Black](#black) · [Blue](#blue) · [Clear](#clear) · [Cyan](#cyan) · [Gray](#gray) · [Green](#green) · [Magenta](#magenta) · [Red](#red) · [White](#white) · [Yellow](#yellow) | | **Properties** | [A](#a) · [B](#b) · [G](#g) · [R](#r) | | **Methods** | [Lerp](#lerp) · [Parse](#parse) · [ToRGB](#torgb) · [ToRGBA](#torgba) · [ToString](#tostring) · [TryParse](#tryparse) | | **Operators** | [op\_Addition](#op_addition) · [op\_Division](#op_division) · [op\_Implicit](#op_implicit) · [op\_Multiply](#op_multiply) · [op\_Subtraction](#op_subtraction) | ## Constructors ### ColorGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar/color --- # Mathf Kind: Class · Namespace: Sansar · Assembly: Sansar.Script.dll · Script API 47.10.0 Floating point math constants and utilities. ```csharp public static class Mathf ``` ## Remarks Provides common floating point constants static methods. ## Members at a glance | Kind | Members | |---|---| | **Fields** | [DegreesPerRadian](#degreesperradian) · [E](#e) · [PI](#pi) · [PiOverTwo](#piovertwo) · [RadiansPerDegree](#radiansperdegree) · [RootTwo](#roottwo) · [RootTwoOverTwo](#roottwoovertwo) · [TwoOverPi](#twooverpi) · [TwoPi](#twopi) | | **Methods** | [Clamp](#clamp) · [IsApproximatelyEqualAbsolute](#isapproximatelyequalabsolute) | ## Fields ### DegreesPerRadianGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar/mathf --- # Quaternion Kind: Struct · Namespace: Sansar · Assembly: Sansar.Script.dll · Script API 47.10.0 Represents a quaternion orientation. ```csharp public struct Quaternion ``` ## Members at a glance | Kind | Members | |---|---| | **Constructors** | [Quaternion](#quaternion) | | **Fields** | [Identity](#identity) | | **Properties** | [Item](#item) · [W](#w) · [X](#x) · [Y](#y) · [Z](#z) | | **Methods** | [Dot](#dot) · [FromAngleAxis](#fromangleaxis) · [FromEulerAngles](#fromeulerangles) · [FromLook](#fromlook) · [FromLookOrthoNormal](#fromlookorthonormal) · [GetEulerAngles](#geteulerangles) · [Inverse](#inverse) · [Length](#length) · [LengthSquared](#lengthsquared) · [Normalized](#normalized) · [Parse](#parse) · [ShortestRotation](#shortestrotation) · [ToAngleAxis](#toangleaxis) · [ToString](#tostring) · [TryParse](#tryparse) | | **Operators** | [op\_Implicit](#op_implicit) · [op\_Multiply](#op_multiply) · [op\_UnaryNegation](#op_unarynegation) | ## Constructors ### QuaternionGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar/quaternion --- # Vector Kind: Struct · Namespace: Sansar · Assembly: Sansar.Script.dll · Script API 47.10.0 The Vector class represents a 3 dimensional vector. ```csharp public struct Vector ``` ## Members at a glance | Kind | Members | |---|---| | **Constructors** | [Vector](#vector) | | **Fields** | [Back](#back) · [Down](#down) · [Forward](#forward) · [Left](#left) · [ObjectBack](#objectback) · [ObjectDown](#objectdown) · [ObjectForward](#objectforward) · [ObjectLeft](#objectleft) · [ObjectRight](#objectright) · [ObjectUp](#objectup) · [One](#one) · [Right](#right) · [Up](#up) · [Zero](#zero) | | **Properties** | [Item](#item) · [W](#w) · [X](#x) · [Y](#y) · [Z](#z) | | **Methods** | [AngleTo](#angleto) · [Cross](#cross) · [Dot](#dot) · [Dot3](#dot3) · [Dot4](#dot4) · [Length](#length) · [LengthSquared](#lengthsquared) · [Lerp](#lerp) · [Normalized](#normalized) · [Orthonormalize](#orthonormalize) · [Parse](#parse) · [Rotate](#rotate) · [ToString](#tostring) · [ToString4](#tostring4) · [TryParse](#tryparse) | | **Operators** | [op\_Addition](#op_addition) · [op\_Division](#op_division) · [op\_Implicit](#op_implicit) · [op\_Multiply](#op_multiply) · [op\_Subtraction](#op_subtraction) | ## Constructors ### VectorGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar/vector --- # VectorExtensions Kind: Class · Namespace: Sansar · Assembly: Sansar.Script.dll · Script API 47.10.0 Additional methods for Mono.Simd.Vector4f. ```csharp public static class VectorExtensions ``` ## Members at a glance | Kind | Members | |---|---| | **Methods** | [Cos](#cos) · [CosSlow](#cosslow) · [SelectWithMask](#selectwithmask) · [Sin](#sin) · [SinSlow](#sinslow) · [SinZeroPiOverTwo](#sinzeropiovertwo) | ## Methods ### CosGenerated from the Sansar 47.10.0 client ScriptApi snapshot.
Source: https://docs.sansar.com/scripting/api/sansar/vectorextensions --- # Allowed .NET APIs > The .NET namespaces, types and members Sansar scripts can use. Scripts can use only the .NET namespaces, types and members listed here. Generated from the Sansar 47.10.0 client's access.html. ## Mono.Simd access.html lists no individual types for this namespace. ## System.Collections.Generic - [Comparer<T>](https://learn.microsoft.com/dotnet/api/system.collections.generic.comparer-1) - [Dictionary<T>](https://learn.microsoft.com/dotnet/api/system.collections.generic.dictionary-2): `Add`, `Clear`, `Comparer`, `ContainsKey`, `ContainsValue`, `Count`, `GetEnumerator`, `Item`, `Keys`, `OnDeserialization`, `TryGetValue`, `Values` - [EqualityComparer<T>](https://learn.microsoft.com/dotnet/api/system.collections.generic.equalitycomparer-1) - [HashSet<T>](https://learn.microsoft.com/dotnet/api/system.collections.generic.hashset-1): `Add`, `Clear`, `Comparer`, `Contains`, `CopyTo`, `Count`, `CreateSetComparer`, `ExceptWith`, `GetEnumerator`, `IntersectWith`, `IsProperSubsetOf`, `IsProperSupersetOf`, `IsSubsetOf`, `IsSupersetOf`, `OnDeserialization`, `Overlaps`, `Remove`, `RemoveWhere`, `SetEquals`, `SymmetricExceptWith`, `TrimExcess`, `UnionWith` - [KeyNotFoundException](https://learn.microsoft.com/dotnet/api/system.collections.generic.keynotfoundexception) - [KeyValuePair<T>](https://learn.microsoft.com/dotnet/api/system.collections.generic.keyvaluepair-2): `Key`, `KeyValuePair