-
Notifications
You must be signed in to change notification settings - Fork 0
World
Oliver Stanton edited this page Oct 11, 2024
·
2 revisions
The CWorld class manages currently open levels, providing an interface to open levels, close them, get them, etc. They are stored in a vector, so must be accessed via an index. This also allows both multiple levels to be open at the same time, and to load one level in the background, then unload the current one after it's loaded. Note that the engine is not multi-threaded. You will need to provide your own way for this.
To load a level, use the openLevel() function:
// MyEntity.cpp
// someFunction
getWorld().openLevel("path relative to directory in engine.json", /* optional level settings */);