2023-07-09 00:16:15 +02:00
|
|
|
---
|
|
|
|
hide:
|
|
|
|
- navigation
|
|
|
|
---
|
2023-08-25 14:34:57 +02:00
|
|
|
# Resource Manager (/root/CORE/ResourceManager)
|
2023-07-09 00:16:15 +02:00
|
|
|
Responsible for loading and unloading resources, even in batches.
|
|
|
|
|
|
|
|
## Methods
|
|
|
|
### loadres()
|
|
|
|
- returns `void`
|
|
|
|
- description `Loads a resource.`
|
|
|
|
- argument `resource_name`
|
|
|
|
- type `String`
|
|
|
|
- mandatory `yes`
|
|
|
|
- description `The name of the resource. Used when getting or unloading the resource.`
|
|
|
|
- argument `resource_path`
|
|
|
|
- type `String`
|
|
|
|
- mandatory `yes`
|
|
|
|
- description `The path to the resource.`
|
|
|
|
- argument `replace`
|
|
|
|
- type `bool`
|
|
|
|
- mandatory `no, default value is false`
|
|
|
|
- description `If a already existing resource should be overridden or not.`
|
|
|
|
### unloadres()
|
|
|
|
- returns `void`
|
|
|
|
- description `Unloads a resource.`
|
|
|
|
- argument `resource_name`
|
|
|
|
- type `String`
|
|
|
|
- mandatory `yes`
|
|
|
|
- description `The resource name.`
|
|
|
|
### loadbatch()
|
|
|
|
- returns `void`
|
|
|
|
- description `Loads a batch of resources.`
|
|
|
|
- argument `batch`
|
|
|
|
- type `Directory`
|
|
|
|
- mandatory `yes`
|
|
|
|
- description `A batch of resources to load.`
|
|
|
|
- format `{"resource_name":"resource_path"}`
|
|
|
|
- argument `replace`
|
|
|
|
- type `bool`
|
|
|
|
- mandatory `no, default value is false`
|
|
|
|
- description `If a already exiting resource should be overridden or not.`
|
|
|
|
### unloadbatch()
|
|
|
|
- returns `void`
|
|
|
|
- description `Unloads a batch of resources.`
|
|
|
|
- argument `batch`
|
|
|
|
- type `Array`
|
|
|
|
- mandatory `yes`
|
|
|
|
- description `A batch of resources to unload.`
|
|
|
|
- format `["resource_name"]`
|
|
|
|
### getres()
|
|
|
|
- description `Returns the requested resource or null if not found.`
|
|
|
|
- argument `resource_name`
|
|
|
|
- type `String`
|
|
|
|
- mandatory `yes`
|
|
|
|
- description `The resource name.`
|