Registering Models
Overview
After defining your model objects and model manager, the next step is to register them with the MetaForge plugin. This registration process ensures that your custom model and manager are recognized by the MetaForge editor, allowing you to use them seamlessly in the Unreal Engine editor for data configuration and management.
Example Code
To register your model and manager with MetaForge, use the following code example:
#pragma once
#include "CoreMinimal.h"
#include "UInitializer.generated.h"
UCLASS()
class UInitializer : public UBlueprintFunctionLibrary
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintCallable, Category = "MetaForge")
static void Initialize() {
#if WITH_EDITOR //this is editor specific stuff
FMetaForgeEditorModule* MyModule = FMetaForgeEditorModule::GetModule();
MyModule->RegisterModule<UMyModelObject, UMyModelManager>("MyModel");
#endif
}
};For more information on how to set up the initialization, refer to the Project Configuration page.
Summary
Registering your model and manager with MetaForge allows them to be recognized and utilized within the Unreal Engine editor. By creating an initializer function and calling it at the appropriate time, you ensure that your custom configurations are ready for use when needed.
Last updated