Files
GDevelop/GDevelop.js/types/gdproject.js
ViktorVovk 5c71a4da56 Allow to unload scene resources when a scene is exited (#7381)
* This adds two new settings, available in the Project Properties and in the Scene Properties dialog, to allow to specify the strategy for preloading resources of the scenes and unloading them. By default, a game will preload in background the resources of all scenes. It will never unload these resources (so scene switching is fast).
* You can now choose to unload the resources of a scene when the scene is left using the "Resources unloading" field. If the scene is launched again later, it will load its resources again.
* You can also choose to change the preloading to disable it for all scenes (by modifying the setting in the project properties) or enable it/disable it on a scene by scene basis. This can be useful for large or modular games where you anticipate the player to only play some scenes, or if you want to reduce the resources that needs to be loaded on a web game.
2025-07-02 16:09:52 +02:00

121 lines
5.5 KiB
JavaScript

// Automatically generated by GDevelop.js/scripts/generate-types.js
declare class gdProject {
constructor(): void;
setName(name: string): void;
getName(): string;
getCategories(): gdVectorString;
setDescription(description: string): void;
getDescription(): string;
setVersion(authorName: string): void;
getVersion(): string;
setAuthor(authorName: string): void;
getAuthor(): string;
getAuthorIds(): gdVectorString;
getAuthorUsernames(): gdVectorString;
isPlayableWithKeyboard(): boolean;
setPlayableWithKeyboard(playable: boolean): void;
isPlayableWithGamepad(): boolean;
setPlayableWithGamepad(playable: boolean): void;
isPlayableWithMobile(): boolean;
setPlayableWithMobile(playable: boolean): void;
setPackageName(packageName: string): void;
getPackageName(): string;
setTemplateSlug(templateSlug: string): void;
getTemplateSlug(): string;
setOrientation(orientation: string): void;
getOrientation(): string;
setProjectUuid(projectUuid: string): void;
getProjectUuid(): string;
resetProjectUuid(): void;
setProjectFile(file: string): void;
getProjectFile(): string;
setGameResolutionSize(width: number, height: number): void;
getGameResolutionWidth(): number;
getGameResolutionHeight(): number;
getAdaptGameResolutionAtRuntime(): boolean;
setAdaptGameResolutionAtRuntime(adaptGameResolutionAtRuntime: boolean): void;
setScaleMode(scaleMode: string): void;
getScaleMode(): string;
setPixelsRounding(pixelsRounding: boolean): void;
getPixelsRounding(): boolean;
setSizeOnStartupMode(orientation: string): void;
getSizeOnStartupMode(): string;
setAntialiasingMode(antialiasingMode: string): void;
getAntialiasingMode(): string;
setAntialisingEnabledOnMobile(pixelsRounding: boolean): void;
isAntialisingEnabledOnMobile(): boolean;
getMaximumFPS(): number;
setMaximumFPS(fps: number): void;
getMinimumFPS(): number;
setMinimumFPS(fps: number): void;
setFolderProject(enable: boolean): void;
isFolderProject(): boolean;
setUseDeprecatedZeroAsDefaultZOrder(enable: boolean): void;
getUseDeprecatedZeroAsDefaultZOrder(): boolean;
setLastCompilationDirectory(path: string): void;
getLastCompilationDirectory(): string;
getExtensionProperties(): gdExtensionProperties;
addPlatform(platform: gdPlatform): void;
getCurrentPlatform(): gdPlatform;
getPlatformSpecificAssets(): gdPlatformSpecificAssets;
getLoadingScreen(): gdLoadingScreen;
getWatermark(): gdWatermark;
hasLayoutNamed(name: string): boolean;
getLayout(name: string): gdLayout;
getLayoutAt(index: number): gdLayout;
moveLayout(oldIndex: number, newIndex: number): void;
swapLayouts(first: number, second: number): void;
getLayoutsCount(): number;
insertNewLayout(name: string, position: number): gdLayout;
removeLayout(name: string): void;
setFirstLayout(name: string): void;
getFirstLayout(): string;
getLayoutPosition(name: string): number;
hasExternalEventsNamed(name: string): boolean;
getExternalEvents(name: string): gdExternalEvents;
getExternalEventsAt(index: number): gdExternalEvents;
moveExternalEvents(oldIndex: number, newIndex: number): void;
swapExternalEvents(first: number, second: number): void;
getExternalEventsCount(): number;
insertNewExternalEvents(name: string, position: number): gdExternalEvents;
removeExternalEvents(name: string): void;
getExternalEventsPosition(name: string): number;
hasExternalLayoutNamed(name: string): boolean;
getExternalLayout(name: string): gdExternalLayout;
getExternalLayoutAt(index: number): gdExternalLayout;
moveExternalLayout(oldIndex: number, newIndex: number): void;
swapExternalLayouts(first: number, second: number): void;
getExternalLayoutsCount(): number;
insertNewExternalLayout(name: string, position: number): gdExternalLayout;
removeExternalLayout(name: string): void;
getExternalLayoutPosition(name: string): number;
hasEventsFunctionsExtensionNamed(name: string): boolean;
getEventsFunctionsExtension(name: string): gdEventsFunctionsExtension;
getEventsFunctionsExtensionAt(index: number): gdEventsFunctionsExtension;
moveEventsFunctionsExtension(oldIndex: number, newIndex: number): void;
swapEventsFunctionsExtensions(first: number, second: number): void;
getEventsFunctionsExtensionsCount(): number;
insertNewEventsFunctionsExtension(name: string, position: number): gdEventsFunctionsExtension;
insertEventsFunctionsExtension(eventsFunctionsExtension: gdEventsFunctionsExtension, position: number): gdEventsFunctionsExtension;
removeEventsFunctionsExtension(name: string): void;
getEventsFunctionsExtensionPosition(name: string): number;
unserializeAndInsertExtensionsFrom(eventsFunctionsExtensionsElement: gdSerializerElement): void;
hasEventsBasedBehavior(type: string): boolean;
getEventsBasedBehavior(type: string): gdEventsBasedBehavior;
hasEventsBasedObject(type: string): boolean;
getEventsBasedObject(type: string): gdEventsBasedObject;
getVariables(): gdVariablesContainer;
getObjects(): gdObjectsContainer;
getResourcesManager(): gdResourcesManager;
setSceneResourcesPreloading(resourcesPreloading: string): void;
getSceneResourcesPreloading(): string;
setSceneResourcesUnloading(resourcesUnloading: string): void;
getSceneResourcesUnloading(): string;
serializeTo(element: gdSerializerElement): void;
unserializeFrom(element: gdSerializerElement): void;
getWholeProjectDiagnosticReport(): gdWholeProjectDiagnosticReport;
static isNameSafe(name: string): boolean;
static getSafeName(name: string): string;
delete(): void;
ptr: number;
};