FAssetPackageObjects
A reflected object as a package's payload (ROADMAP §23.2): a root node <Class> "<Name>" { ... } carrying the MPROPERTY values that differ from the class's default object — a new field is absent and reads at its default, an unknown key is skipped. This is how a data asset, a settings object or any MCLASS type becomes an asset without a hand-written writer.
- Module
- Game
- Header
#include "AssetSystem/AssetPackageObjects.h"- Namespace
Mowo
Public functions
| Returns | Name | Description |
|---|---|---|
MDF::MdfNode* | WriteObject | Appends object to the payload and adds every asset path its values name to the import table. |
MDF::MdfPackage | MakeObjectPackage | A whole text package around one object: class, id (fresh when empty), one export. |
MObject* | ReadObject | Constructs the root's class by name and applies its properties. |
void | ApplyObject | Applies a root's properties onto an existing object of its class. |
Function details
WriteObject
static MDF::MdfNode* WriteObject(MDF::MdfPackage& package, MObject* object, const std::string& name)Appends object to the payload and adds every asset path its values name to the import table. The package takes the object's class when it has none. Null when the object has no registered class.
MakeObjectPackage
static MDF::MdfPackage MakeObjectPackage(MObject* object, const std::string& name, const std::string& id)A whole text package around one object: class, id (fresh when empty), one export.
ReadObject
static MObject* ReadObject(const MDF::MdfNode& root)Constructs the root's class by name and applies its properties. The object is not rooted: the caller owns it (TStrongObjectPtr) before the next collection. Null when the class is unknown or abstract.
ApplyObject
static void ApplyObject(const MDF::MdfNode& root, MObject* object)Applies a root's properties onto an existing object of its class.