Unreal uses mostly, if not almost exclusively, raw pointers. Why? Cause with its own garbage collection, regular smart pointers aren't really necessary. As long as its a "UPROPERTY()" Unreal itself will handle everything itself.
AActor* MyActor;
Important: if you're using smart pointers, it can cause serious issues. Especially if mixed with UPROPERTY()!
This is basically just a raw pointer in a special container being a little more flexible.
TObjectPtr<AActor> MyActor;
Though I haven't yet really been able to figure out how.
Info?
TStrongObjectPtr<AActor> Actor;
Actor = TStrongObjectPtr("Any Pointer");
Info?
Info?
TWeakObjectPtr<AActor> Actor;
Info?
Basically just the path to an object instead of a direct pointer. This can heavily reduce memory because for example some actors won't have to load other classes into memory unless needed.
TSoftObjectPtr<AActor> MySoftObjectPtr;
You can load them most simply using.
const TSoftObjectPtr<AActor> MySoftObjectPtr;
AActor* MyActor = MySoftObjectPtr.LoadSynchronous();
There is also an asynchronous way (later), but this is the easiest implementation. This will load the soft reference when needed and not before. Extremely useful for instance, if an Actor can access others and are listed as an array.
Info?
TUniquePtr<AActor> Actor;
Info?
Info?
TSharedPtr<AActor> Actor;
Info?
Info?
TSharedPtr<AActor> Actor;
Info soon!