Project Configuration

Overview

This section provides instructions on how to set up the project-specific configuration for MetaForge. This involves setting up a configuration blueprint and creating a blueprint library for initializing your project with MetaForge.

Configuration Steps

Step 1: Create the Configuration Blueprint

  1. In the Content Browser, navigate to the folder where you would like to store the configuration.

  2. Right-click and select Blueprint Class.

  3. Search for Base Custom Configuration and select it as the parent class.

    Configuration Class

  4. Name the new blueprint appropriately (e.g., MetaForgeConfig).

  5. Open the newly created blueprint to modify its properties to fit your project's requirements.

Step 2: Set Up the Blueprint Library

  1. Create a new class derived from UBlueprintFunctionLibrary (e.g., UInitializer).

  2. Implement a function (e.g., Initialize()) to initialize MetaForge and register your custom configuration.

Example Code:

#pragma once

#include "UInitializer.generated.h"

UCLASS()
class UInitializer : public UBlueprintFunctionLibrary
{
    GENERATED_BODY()

public:
    UFUNCTION(BlueprintCallable, Category = "Data Model")
    static void Initialize() {
        #if WITH_EDITOR //this is editor specific stuff
            FMetaForgeEditorModule* MyModule = FMetaForgeEditorModule::GetModule();
            //This is where we will initialize our models that we would like to edit.
        #endif
    }
};

Step 3: Connect the Blueprint Initialize Event

  1. Open the configuration blueprint you created in Step 1.

  2. In the Event Graph, override the Initialize event to trigger the initialization.

    Init Event

  3. Drag off the event node and search for the Initialize function from the function library you created in Step 2.

  4. Connect the event to the Initialize function to ensure that MetaForge is initialized when the event is triggered.

Blueprint Setup

Last updated