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:

Download the script files from the download link at the end of this article.