importNamespace Function
The importNamespace
method allows importing a namespace of a .NET DLL. For a dll to be loaded, it must be present in the folder GMSMainProject\scriptingLibraries.
Syntax
It is possible to import the namespace of a .NET DLL. See the following example:
var namespace = importNamespace("Example.MyLibrary");
var myObject = new namespace.MyObject();
var result = myObject.method();
Parameters Usage
Parameter | Type | Default | Use | Annotation |
namespace | String | - | Mandatory | Namespace to include. |
Note that:
- The names of namespaces, classes, and methods are case sensitive. Any invalid casing results in the script failure.
- It is not possible to import "System" namespace and its derived namespaces.
Result
The return value of the operation is the namespace object.