Skip to content

Class: DataProject ​

IProject for games authored as data (editor scenes + prefab/asset manifest) instead of an OnInit that builds scenes in code. Scripts reach it through DataProject.Current to switch scenes.

Implements ​

Constructors ​

Constructor ​

ts
new DataProject(manifest, options?): DataProject;

Parameters ​

ParameterType
manifestProjectManifest
optionsDataProjectOptions

Returns ​

DataProject

Properties ​

PropertyModifierTypeDefault value
CurrentstaticDataProject | nullnull
namereadonlystringundefined
versionreadonlystringundefined

Methods ​

GetActiveScene() ​

ts
GetActiveScene(): Scene | null;

Returns ​

Scene | null

Implementation of ​

IProject.GetActiveScene


GetSceneNames() ​

ts
GetSceneNames(): string[];

Returns ​

string[]


LoadScene() ​

ts
LoadScene(nameOrPath): boolean;

Swaps the active scene; systems get OnStop/OnStart on the next tick. Accepts either the manifest key ("scenes/Level2.scene.json") or the bare name ("Level2"). Scripts call this from inside system iteration, so the swap is deferred out of the current synchronous pass — clearing a scene mid-ForEach would mutate the sparse set being walked.

Parameters ​

ParameterType
nameOrPathstring

Returns ​

boolean


LoadSceneAdditive() ​

ts
LoadSceneAdditive(nameOrPath): Promise<LoadedScene | null>;

Adds a scene's entities to the running one (Scene.LoadAdditive). Async to match the editor's Play, which fetches the file; here every scene is already in the manifest.

Parameters ​

ParameterType
nameOrPathstring

Returns ​

Promise<LoadedScene | null>


OnClose() ​

ts
OnClose(): void;

Returns ​

void

Implementation of ​

IProject.OnClose


OnInit() ​

ts
OnInit(engine): Promise<boolean>;

Parameters ​

ParameterType
engineIEngine

Returns ​

Promise<boolean>

Implementation of ​

IProject.OnInit

© 2026 PlayAdGentic