Since MenuInterface will be a UObject, should the field be marked as a UPROPERTY so that Unreal’s garbage collection system can keep track of it?
In this particular case where we know we are using the GameInstance, I suppose that won’t ever get collected because of other things keeping it alive, but I’m wondering about recommendation for when that is not known.
I tried marking it with UPROPERTY and the compiler told me to use a TScriptInterface. I found the following article though where someone recommended just defining it as a UObject instead though: