natiny_resource_load

C
NatinyResource natiny_resource_load(const char* path);

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 const char* Name of the file inside a mounted folder, such as "textures/hero.png"

Returns

Type Description
NatinyResource Resource handle, or 0 when loading fails

Example

C
natiny_resource_mount("data", NULL);

NatinyResource res = natiny_resource_load("textures/hero.png");