Runtime Usage
Last updated
Last updated
To use MetaForge at runtime, you can add a method to a Blueprint Function Library to retrieve your model objects. Since you already have a Blueprint Library for initialization, that would be an ideal place to add this functionality, but any Blueprint Library will work.
Here's an example of a method that retrieves model objects:
This method returns a list of UDemoCharacter
objects from the UDemoCharacterManager
singleton. You can modify the return type and the logic based on the model objects you want to retrieve.
Once you've added the method to your Blueprint Function Library, you can hook it into any Blueprint in your game. For example, you can use the GetCharacters
method to populate a list in your UI, as shown in the following screenshot:
This screenshot demonstrates how you can use the GetCharacters
function to get a list of characters and set them as items in a List View widget, making it easy to integrate MetaForge data into your runtime gameplay features.