Skip to content

Get Sansar

Scripting

Adding Scripts to an Object

Where: Client
More page actions

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

You can add scripts to objects in order to make them perform actions or interact with avatars and the environment. When scripts are added to an object, they become part of the object as that object’s component. Currently, there are two ways to add a script component to an object:

Drag and Drop the script from your Inventory

Section titled “Drag and Drop the script from your Inventory”

To add scripts using the drag and drop method from your Inventory:

  1. In Edit Mode, choose an object you want to apply the script to. It can be an existing object in the scene or a new object from your Inventory. If you wish to add the script to a new object, drag that object into the scene.

  2. Select the script from your Inventory and drag the script to the object.

  3. Now that the script has been applied to the object, open the properties panel for the object. Select the object and click the Properties button to open the properties panel.

    Properties button
    Click the Properties button on the object menu.
  4. At the bottom of the object’s Properties panel is a Script Settings section. From there, you can edit the script’s parameters.

Screenshot pending
Apply a script
Drag and drop a script onto an object in the scene.

Adding the script from the Scene Objects panel

Section titled “Adding the script from the Scene Objects panel”

To add scripts via the Scene Objects panel, see adding scripts in Object Editing.

For more information on scripts, see Working with scripts.

Have more questions? Email help@sansar.com.