ResourcePackage - stingray.ResourcePackage object reference - Stingray Lua API Reference

stingray.ResourcePackage object reference

Description

An interface for loading and unloading packages (groups of resources that you define in data files with the .package extension).

Functions

Parameters

self :

stingray.ResourcePackage

Specifies the object instance that this function will act on.

You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation.
Returns
This function does not return any values.

If the package has not been fully loaded, this call blocks the game until the package gets loaded. Therefore, you may want to first test that the package has been loaded into memory by calling has_loaded().

Parameters

self :

stingray.ResourcePackage

Specifies the object instance that this function will act on.

You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation.
Returns

boolean

Returns true if the package has been fully loaded.

Parameters

self :

stingray.ResourcePackage

Specifies the object instance that this function will act on.

You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation.
Returns
This function does not return any values.
Parameters

self :

stingray.ResourcePackage

Specifies the object instance that this function will act on.

You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation.
Returns
This function does not return any values.

You must make sure that the resources are no longer in use in the game before unloading them.