October 2016
Intermediate to advanced
452 pages
9h 47m
English
Follow the first two recipes so that you have a UInterface we can check for, and a class implementing the interface, which can be tested against.
BeginPlay function:FTransformSpawnLocation;
ASingleInterfaceActor* SpawnedActor = GetWorld()->SpawnActor<ASingleInterfaceActor> (ASingleInterfaceActor::StaticClass(), SpawnLocation);
if (SpawnedActor->GetClass()->ImplementsInterface(UMyInterface::StaticClass()))
{
GEngine->AddOnScreenDebugMessage(-1, 1, FColor::Red, TEXT("Spawned actor implements interface!"));
}ASingleInterfaceActor and IMyInterface, we need to #include both MyInterface.h and ...Read now
Unlock full access