How to get an interface pointer variable to work w/UPROPERTY()

YawLighthouse
Thu, 26 Jan 2017 14:10:49 +0000
UI

Hello, I am attempting to have an interface pointer variable that is declared in the header be VisibleAnywhere, BlueprintReadOnly in the UPROPERTY() but when I compile it gives me an error:
UPROPERTY pointers cannot be interface - did you mean TScriptInterface?

But I don’t know what that means or how TScriptInterface’s work…
If anybody can point me(excuse the pun) in the right direction or just flat out tell me how to fix this, that would greatly appreciated.

the header:

protected:

               UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Interface Variable")
               IMyInterface* SelfInterface;

18 posts - 4 participants