When I got an actor which spawns another actor. And I need to connect both of those actors with the help of pointers, whats the best way to do so.
I was using UPROPERTY() pointer to do such kind of links.
UPROPERTY()
AActor* Actor
But, I came across many places in the engine where a SharedPtr and a WeakPtr is used such kinds of links. What are the advantage of using them over normal pointer and how do I link the pointer in that way after spawning?
Isn’t TSharedFromThis only necessary if you want to obtain the SharedPtr from the class itself? I don’t think you need to inherit from TSharedFromThis use it with SharedPtr.