natiny_script_make_handle
NatinyScriptValue natiny_script_make_handle(uint64_t handle);
Wraps an engine handle for use by a script. The script receives it as a number.
Parameters
| Name | Type | Description |
|---|---|---|
handle |
uint64_t |
Engine handle to wrap; ownership does not change |
Returns
| Type | Description |
|---|---|
NatinyScriptValue |
Value tagged NATINY_SCRIPT_HANDLE and containing handle |
Example
natiny_script_set(script, "game.window", natiny_script_make_handle(window));