I feel the current code is maybe error prone, since TObjectPtr or TWeakObjectPtr both are translated to UObject.
There's no guarantee both are saving UObject directly.
I haven't read through their implementation, but it seems TWeakObjectPtr is not saving pointer value, instead if it save ObjectIndex to query GUObjectArray.
Hi,
Why the code is like this:
Instead of
I feel the current code is maybe error prone, since TObjectPtr or TWeakObjectPtr both are translated to UObject.
There's no guarantee both are saving UObject directly.
I haven't read through their implementation, but it seems TWeakObjectPtr is not saving pointer value, instead if it save ObjectIndex to query GUObjectArray.