![]() |
ezEngine
Release 25.03
|
A base class for user-defined data assets. More...
#include <CustomData.h>
Public Member Functions | |
virtual void | Load (class ezAbstractObjectGraph &ref_graph, class ezRttiConverterContext &ref_context, const class ezAbstractObjectNode *pRootNode) |
Loads the serialized custom data using a robust serialization-based method. More... | |
![]() | |
virtual const ezRTTI * | GetDynamicRTTI () const |
bool | IsInstanceOf (const ezRTTI *pType) const |
Returns whether the type of this instance is of the given type or derived from it. | |
template<typename T > | |
EZ_ALWAYS_INLINE bool | IsInstanceOf () const |
Returns whether the type of this instance is of the given type or derived from it. | |
Additional Inherited Members | |
![]() | |
static const ezRTTI * | GetStaticRTTI () |
A base class for user-defined data assets.
Allows users to define their own asset types that can be created, edited and referenced in the editor without writing an editor plugin.
In order to do that, subclass ezCustomData, and put the macro EZ_DECLARE_CUSTOM_DATA_RESOURCE(YourCustomData) into the header next to your custom type. Also put the macro EZ_DEFINE_CUSTOM_DATA_RESOURCE(YourCustomData) into the implementation file.
Those will also define resource and resource handle types, such as YourCustomDataResource and YourCustomDataResourceHandle.
For a full example see SampleCustomData in the SampleGamePlugin.
|
virtual |
Loads the serialized custom data using a robust serialization-based method.
This function does not need to be overridden. It will work, even if the properties change. It is only virtual in case you want to hook into the deserialization process.