I have an interface that is implemented by several classes
It is used to mark some actors in my game as Service providers for player
UINTERFACE(MinimalAPI)
class UServiceLocationInterface : public UInterface
{
GENERATED_BODY()
};
class STARATLAS_API IServiceLocationInterface
{
GENERATED_BODY()
public:
virtual const FText GetServiceName() = 0;
virtual const FText GetServiceAdditionalInfo() = 0;
};
What I want to do is create something like this
UPROPERTY(EditAnywhere)
TArray<TScriptInterface<IServiceLocationInterface>> ServiceLocations;
So that when I open the actor with this property I would be able to store a list of objects in my level that implement this interface
It is done in such a way because the services themselves are different actors and I want to be able to gather the information about nearby services in one place. The actor I want to store this in is actually a teleport point for the player. I want to be able to ask that teleport point which services does it have so the player has an easier time choosing where he wants to go