Getting the reference of a UUserWidget class in C++

class APlayerCharacterController : public APlayerController
{
GENERATED_BODY()

	public:
		UFUNCTION(BlueprintPure, Category="Player Data")
		TArray<FSpellDataStruct> GetModifierArray();

		UFUNCTION(BlueprintCallable, Category="Player Data")
		void SetModifierArray(UPARAM(ref) TArray<FSpellDataStruct>& Array);

		UFUNCTION(BlueprintCallable, Category="UI")
		UPlayerCharacterUI* GetPlayerUIReference();

	private:
		UPROPERTY(EditDefaultsOnly, Category = "Player Data")
		TArray<FSpellDataStruct> ModifierArray;

		UPROPERTY(EditDefaultsOnly, Category = "UI")
		UPlayerCharacterUI PlayerUIReference;

};

My player controller. I can’t get the function GetPlayerUIReference to work. UPlayerCharacterUI is parented to UUserwidget.

If I remove the pointer it asks for me to add one.

I’m definitely missing something here.

Nevermind, the fix to this was simply a few restarts!