References
Last updated
Last updated
References in MetaForge provide a way to establish relationships between different model objects. By using references, developers can link data together, making it easier to create interconnected models and implement complex game data structures in the Unreal Engine editor. References allow you to point from one model object to another, providing a flexible and reusable approach to managing game assets.
References in MetaForge work by defining a property to hold the ID of the referenced model. You can use the UPROPERTY
macro to define the reference, specifying the metadata to configure how the reference works.
Here is an example of defining a reference in a model object:
In this example:
MyOtherObjectReference
holds the ID of the referenced model.
LoadFunction
is a UFUNCTION()
defined on the model object that returns a TArray
of IDataModel
-derived object pointers.
References only work for objects that are derived from UObject
and IDataModel
.
References are a powerful feature in MetaForge that allow you to create relationships between model objects. By using references, you can build complex and interconnected data structures while maintaining flexibility and reusability. Whether you need strong or weak references, MetaForge provides the tools to manage these relationships effectively within the Unreal Engine editor.