3.5. Create Blueprint Soda Actor

3.5.1. Introduction

Upon completion of this guide, you will be adept at making any Unreal Engine actor (AActor) accessible in the Soda Editor Mode.

3.5.1.1. Before you start

Start by exploring the articles Asset Management and UPrimaryDataAsset on the Unreal Engine official website for essential background information.

Create an actor class, ensuring it directly or indirectly inherits from the AActor class.

The actor should also directly or indirectly implement the ISodaActor interface. This step is applicable for both Blueprint and C++ actors.

3.5.2. Blueprint actor

3.5.2.1. Create Blueprint Soda Actor

  1. Go to Class Settings of your actor and add ISodaActor interface:

    Untitled

  2. (Optional) For local variables that need to be editable in Soda Editor, ensure they are properly marked. Override the Generate Metadata function of the actor class to achieve this:

    Untitled

    And mark necessary variables as it is shown below:

    Untitled

3.5.2.2. Create Blueprint Soda Actors Library

How to create USodaLibraryPrimaryAsset library:

  1. Go to Content Browser and navigate to a directory containing Soda Actors you’d like to organize into library. Then right-click on empty space and select Blueprint Class from the Create Basic Asset category:

    image.jpg

  2. In the Pick Parent Class window, expand the All Classes section, find and select SodaLibraryPrimaryAsset. Click Select to create the new Blueprint asset:

    Untitled

  3. In the Content Browser, double-click the SodaLibraryPrimaryAsset Blueprint to open it.

    Untitled

  4. For each Soda Actor add corresponding record to Soda Actors list and fill description fields: category, name and icon. Check Allow Span flag. See FSodaActorDescriptor for more details.

    Untitled

  5. Ensure that newly created SodaLibraryPrimaryAsset library is included to Primary Assets Types to Scan (see Edit → Project Settings → Asset Manager). In Directories section you should list root directories for all plugins where the library may be used, along with /Game root directory: ARR

    Untitled