XRS Scripting Language
- Last UpdatedApr 24, 2024
- 2 minute read
XRS Script language has been designed to provide XR Studio users with familiar syntax and programming methodology in the application business logic development. Even if it features a few syntactic peculiarities, its core principles and syntax are very intuitive to any person with object-oriented programming/scripting experience in languages such as C#, C++, or javascript.
The XRS Script is an interpreted language, thus not compiled, and it is parsed and executed within the same sandbox of XML script. Internally, it is all handled by proprietary implementations without relying on any open-source or commercial library. This means that, even if the script syntax looks like C#, its APIs and capabilities are restricted compared to publicly available generic-purpose scripting language, giving complete control to the XR Framework.
Cybersecurity measures are enforced to make sure the scripts cannot operate outside of the sandbox and available capabilities don’t allow for the crafting of malicious scripts that operate at any other level than the provided APIs.
XRS Scripts and XML Scripts can coexist in the same project, as both have their limitations and strengths. It is advisable to architect your application logic using a mix of the two scripting languages.
In general terms, XML Script should be used for parse-time definitions, routing, and parse-time switches (such as conditional inclusion of logic blocks based on current platform), while XRS Script brings advantages in both code readability and performances when it comes to imperative method definitions.
Under this section of the documentation, you can find:
-
Syntax - Contains the details of XRS Script syntax and concepts.
-
Developer Guide - Contains descriptions of predefined static classes and integration tips.