MCPcopy
hub / github.com/4ian/GDevelop / ResourceManager

Interface ResourceManager

GDJS/Runtime/ResourceManager.ts:12–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10 * @category Resources
11 */
12 export interface ResourceManager {
13 /**
14 * Load the specified resource.
15 *
16 * This method will be run during the game. It should only do light tasks
17 * like file downloading.
18 */
19 loadResource(resourceName: string): Promise<void>;
20
21 /**
22 * Process the specified resource.
23 *
24 * This method will only be run while loading screen is shown. It can do
25 * heavy tasks like parsing data.
26 */
27 processResource(resourceName: string): Promise<void>;
28
29 /**
30 * Return the kind of resources handled by this manager.
31 */
32 getResourceKinds(): Array<ResourceKind>;
33
34 /**
35 * Clear all resources, data, loaders stored by this manager.
36 * Using the manager after calling this method is undefined behavior.
37 */
38 dispose(): void;
39
40 /**
41 * Clear any data in cache for a resource. Embedded resources are also
42 * cleared.
43 *
44 * Usually called when scene resources are unloaded.
45 *
46 * @param resourceData The resource to clear
47 */
48 unloadResource(resourceData: ResourceData): void;
49 }
50}

Callers 14

_loadResourceMethod · 0.65
_processResourceMethod · 0.65
constructorMethod · 0.65
_updateShadowMapSizeMethod · 0.65
clearNextMethod · 0.65
drainMethod · 0.65
disposeMethod · 0.65
removeMethod · 0.65
removeAllMethod · 0.65
disposeAssetMethod · 0.65

Implementers 10

SpineAtlasManagerExtensions/Spine/managers/pixi-spine-a
SpineManagerExtensions/Spine/managers/pixi-spine-m
InternalInGameEditorOnlySvgManagerGDJS/Runtime/ResourceLoader.ts
JsonManagerGDJS/Runtime/jsonmanager.ts
Model3DManagerGDJS/Runtime/Model3DManager.ts
FontFaceObserverFontManagerGDJS/Runtime/fontfaceobserver-font-man
HowlerSoundManagerGDJS/Runtime/howler-sound-manager/howl
PixiImageManagerGDJS/Runtime/pixi-renderers/pixi-image
PixiBitmapFontManagerGDJS/Runtime/pixi-renderers/pixi-bitma
MockedResourceManagerGDJS/tests/tests/Extensions/MockedReso

Calls

no outgoing calls

Tested by

no test coverage detected