![]() |
ezEngine
Release 25.03
|
Stores an entire ezWorld in a stream. More...
#include <WorldWriter.h>
Public Member Functions | |
void | WriteWorld (ezStreamWriter &inout_stream, ezWorld &ref_world, const ezTagSet *pExclude=nullptr) |
Writes all content in world to stream. More... | |
void | WriteObjects (ezStreamWriter &inout_stream, const ezDeque< const ezGameObject * > &rootObjects) |
Only writes the given root objects and all their children to the stream. | |
void | WriteObjects (ezStreamWriter &inout_stream, ezArrayPtr< const ezGameObject * > rootObjects) |
Only writes the given root objects and all their children to the stream. | |
void | WriteGameObjectHandle (const ezGameObjectHandle &hObject) |
Writes the given game object handle to the stream. More... | |
void | WriteComponentHandle (const ezComponentHandle &hComponent) |
Writes the given component handle to the stream. More... | |
ezStreamWriter & | GetStream () const |
Accesses the stream to which data is written. Use this in component serialization functions to write data to the stream. | |
const ezDeque< const ezGameObject * > & | GetAllWrittenRootObjects () const |
Returns an array containing all game object pointers that were written to the stream as root objects. | |
const ezDeque< const ezGameObject * > & | GetAllWrittenChildObjects () const |
Returns an array containing all game object pointers that were written to the stream as child objects. | |
Stores an entire ezWorld in a stream.
Used for exporting a world in binary form either as a level or as a prefab (though there is no difference). Can be used for saving a game, if the exact state of the world shall be stored (e.g. like in an FPS).
void ezWorldWriter::WriteComponentHandle | ( | const ezComponentHandle & | hComponent | ) |
Writes the given component handle to the stream.
void ezWorldWriter::WriteGameObjectHandle | ( | const ezGameObjectHandle & | hObject | ) |
Writes the given game object handle to the stream.
void ezWorldWriter::WriteWorld | ( | ezStreamWriter & | inout_stream, |
ezWorld & | ref_world, | ||
const ezTagSet * | pExclude = nullptr |
||
) |
Writes all content in world to stream.
All game objects with tags that overlap with pExclude will be ignored.