![]() |
Raven Engine v0.1
|
Serializes and deserializes a Scene to/from disk. More...
#include <SceneSerializer.h>
Public Member Functions | |
| SceneSerializer (const Ref< Scene > &scene) | |
| Constructs a SceneSerializer for a specific Scene. | |
| void | Serialize (const std::filesystem::path &filepath) |
| Serializes the Scene to the given file path. | |
| void | Deserialize (const std::filesystem::path &filepath) |
| Deserializes the Scene from the given file path. | |
Serializes and deserializes a Scene to/from disk.
This class handles the conversion of Scene data into a storable format (currently only JSON) and vice versa. It works on a reference to a Scene instance provided at construction.
Constructs a SceneSerializer for a specific Scene.
| scene | Reference to the Scene object to serialize/deserialize. |
| void Raven::SceneSerializer::Deserialize | ( | const std::filesystem::path & | filepath | ) |
Deserializes the Scene from the given file path.
Loads scene data from a JSON file and recreates entities and components.
| filepath | The filesystem path of the scene file to load. |
| void Raven::SceneSerializer::Serialize | ( | const std::filesystem::path & | filepath | ) |
Serializes the Scene to the given file path.
Converts the Scene’s entities and components into a JSON file.
| filepath | The filesystem path where the scene will be saved. |