TResourceManager
Index
Constructors
Methods
Constructors
constructor
Parameters
jobs: default
Returns default
Methods
publicget
Type parameters
- T: IJobAsset | IAsset
Parameters
key: string
Returns undefined | T
publicisResourcedLoaded
Checks if a resource is already loaded into the cache
Parameters
key: string
resource key
Returns boolean
publicload
Loads a resource of type T with the specified key. If the resource is already loaded, it returns the cached resource. Otherwise, it fetches the resource, caches the loaded resource, and returns it.
Type parameters
- T: IJobAsset | IAsset
Parameters
type: new () => T
The constructor function of the resource type T.
key: string
The key or URL of the resource to load.
optionalconfig: unknown
Returns Promise<T>
A promise that resolves to the loaded resource of type T.
Returns an already loaded resource.
Must be loaded, otherwise undefined will be returned.