Hello,
How to define my own “team agent” interface, that derives from IGenericTeamAgentInterface ?
Thx!
Hello,
How to define my own “team agent” interface, that derives from IGenericTeamAgentInterface ?
Thx!
Hello,
You can’t make the class directly from editor C++ class creator, you can make it by following steps:
1- add “AIModule” in your
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "AIModule" });
2- Create a c++ class by selecting UObject as parent YourProject.build.cs
3- change the new class header file to
#pragma once
#include "CoreMinimal.h"
#include "GenericTeamAgentInterface.h"
#include "Your_TeamAgentInterface.generated.h"
/**
*
*/
UINTERFACE()
class UYour_TeamAgentInterface : public UGenericTeamAgentInterface
{
GENERATED_UINTERFACE_BODY()
};
class Your_API IYour_TeamAgentInterface : public IGenericTeamAgentInterface
{
GENERATED_IINTERFACE_BODY()
};
4- Add constructor to c++ file :
#include "Your_TeamAgentInterface.h"
UYour_TeamAgentInterface::UYour_TeamAgentInterface (const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
}