natiny.resource.load
natiny.resource.load(path) -> resource
Synchronously loads a resource out of the mounted folders, or from disk (the network on web) when no mount holds it.
Parameters
| Name | Type | Description |
|---|---|---|
path |
string |
Name of the file inside a mounted folder, such as "textures/hero.png" |
Returns
| Type | Description |
|---|---|
number |
Resource handle; raises an error when loading fails |
Example
local res = natiny.resource.load("textures/hero.png")