It's possible in script to declare a method on a type outside the class body. This can be useful either to add methods to types from C++, or to separate out functionality from different systems.
To do this, declare a global function with the
The first parameter of the mixin function is filled with the object it is called on.
When creating mixins for structs, you can take a reference to the struct as the first parameter. This allows changes to be made to it:
Note: It is also possible to create mixin functions from C++ with bindings.
See Script Mixin Libraries for details.