Should I only declare raw pointers as UPROPERTY?

Hmmm, that makes sense. I’ll dig more into that.

Got it, I will revise these pointers more carefully.

Yup, I indeed though it would not automatically null the pointer. I was just guessing for correctness-sake. Like deleting a object and be not careful enough to eventually use it somehow.

Anyway, thanks for the discussion. I’ve been always using either raw pointers or raw pointeirs with UPROPERTY() when it had some kind o metadata in it - or when Unreal’s API forced me to use some of its other types. I will dig more into the different types of pointers there are and use them more properly.

However, can you tell me if this sound correct:

If pointing to a UObject: Use raw pointer always with UPROPERTY() or TWeakObjectPtr.
If pointing to a non-UObject: Either use TSharedPtr or TUniquePtr depending on desired ownership.