Unique Name of a Script Type. If a Script Type with the same name has
already been registered and the new one has a swap
method defined in its prototype, then it
will perform hot swapping of existing Script Instances on entities using this new Script Type.
Note: There is a reserved list of names that cannot be used, such as list below as well as some
starting from _
(underscore): system, entity, create, destroy, swap, move, scripts, onEnable,
onDisable, onPostStateChange, has, on, off, fire, once, hasEvent.
Optional
app: AppBaseOptional application handler, to choose which ScriptRegistry
to add a script to. By default it will use Application.getApplication()
to get current
AppBase.
A class type (constructor function) that inherits ScriptType, which the developer is meant to further extend by adding attributes and prototype methods. Returns null if there was an error.
Create and register a new ScriptType. It returns new class type (constructor function), which is auto-registered to ScriptRegistry using its name. This is the main interface to create Script Types, to define custom logic using JavaScript, that is used to create interaction for entities.