natiny_script_open_resource
void natiny_script_open_resource(NatinyScript script);
Makes the Lua API for resource loading, mounting and contents available as natiny.resource in the
specified state.
Parameters
| Name | Type | Description |
|---|---|---|
script |
NatinyScript |
State whose natiny module receives the resource table |
Example
natiny_script_open_std(script);
natiny_script_open_resource(script);
if (natiny_script_run(script, source) != NATINY_SCRIPT_OK)
return 1;
Here, source may contain:
local natiny = require("natiny")
assert(natiny.resource ~= nil)