I’m a Unity developer trying to dive into Unreal.
To get an interface type as a UPROPERTY I ended up with this:
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Trigger Target") TScriptInterface<class ITriggerableInterface> TriggerableObject;
But: I won’t be able to pick an actor (which implements this interface) from the scene.
All I get is an asset path textfield in the details panel.
I wanted to go the interface way to use my trigger object for all sorts of other objects and not just “doors” like I did before:
UPROPERTY(EditAnywhere, BlueprintReadOnly) class ADoor* Door;
Which would work and look like this in the details panel:
I fear that I reached a dead end now… :-/.
Still I wanted to ask whether it’s possible to achieve what I wanted: An editor slot to reference all UObjects which implement my c++ interface.
Should I have used an abstract AActor instead?