# Importing Custom Scripts

## Selling This Asset Type

To sell this asset type, follow this guide: [Selling Scripts](/latest/sansarstore/selling-your-content/selling-different-asset-types/world-based-items/scripts.md).

### Import a custom script

You must be editing a scene in order to import a custom script, it is suggested to create a blank scene to use for testing purposes as in order to test the script you must build the world and visit.

1. Navigate to edit mode via the left side menu and edit a scene of your choice or create a new one.

<figure><img src="/files/JJzVxSVLPPk8zTFLDrnb" alt="Customize avatar" width="475"><figcaption></figcaption></figure>

2. At the top left press 'Import' then 'Script'

<figure><img src="/files/vWdhHwdCAsXSER4hruFi" alt="Customize avatar" width="475"><figcaption></figcaption></figure>

3. Click 'Browse' and choose the script file you wish to import, you can import files with the extensions .cs or .json
4. Name your script, this is the name it will appear with in your inventory.
5. Click 'Import' and the importer will start compiling, if the script compiles it is now added to your inventory, if not check the log tab for more information on what the problem may be.
6. You can now test your script by adding it to a object in the scene then you must build and visit the world during runtime to test. If you are the owner of a world you can press CTRL+D to open the Debug window for scripts in a scene, this is where your `Log.Write(" ")` messages would appear for your scripts.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sansar.com/latest/creating-in-sansar/importing-things-to-sansar/importing-accessories/importing-custom-scripts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
