Being able to define UInterface methods in C++ is great, but they should be accessible from Blueprint too. Otherwise, designers or others who are using Blueprint won't be able to interact with your UInterface. This recipe shows you how to make a function from an interface callable within the Blueprint system.
Exposing UInterface methods to Blueprint from a native base class
How to do it...
- Create a UInterface called PostBeginPlay:
- Open PostBeginPlay.h in Visual Studio and update the UINTERFACE of UPostBeginPlay and add the following virtual method in IPostBeginPlay:
#pragma once
#include "CoreMinimal.h"
#include "UObject/Interface.h"
#include "PostBeginPlay.generated.h"
UINTERFACE(meta ...