2

Scripting with Visual Studio IntelliSense - A Pictorial Guide

Since the process of setting up VS with the script API isn't very obvious to newcomers and it'll inevitably get asked as more and more people try to get in, I want to give everybody a starting point as straightforward as I possibly could.

At the time of writing, this is only guaranteed to work with VS 2015. 2017 will crash.

  1. Open a new project, and use an empty template.
    (Make sure you select .NET Framework 4.6 at the top.)

  2. Open the Add Reference window.

  3. Add the two Sansar DLL files.
    (You will find these in the Sansar client folder, in ScriptApi > Assemblies)

  4. Also add the .NET System.dll.

  5. Click OK and you're ready!

From here you can add a new Class to your project and that will be your script. You should never need to make multiple projects, as each script is self-contained and you will not be compiling these files yourself. Scripts are compiled by the upload process in Sansar.

See: https://help.sansar.com/hc/en-us/sections/115001283328-Working-with-Scripts

15 comments

Please sign in to leave a comment.