Will a UPROPERTY within a non-UPROPERTY member work?
My question is probably best explained with very little code:
The above struct only has 1 purpose: to store the referenced object that would otherwise not be a UPROPERTY into a UPROPERTY (I would also implement a constructor that takes a UObject* and override the operator== for use below, but lets skip this for the example).
Now my question: will this prevent garbage collection of all objects stored in s_References if they are not hard referenced anywhere else? If not, is there a way to store hard references to UObjects in non UPROPERTY fields? There is no TObjectPtr or something like that, only weak pointers (talking about TWeakObjectPtr).
Follow this question
Once you sign in you will be able to subscribe for any updates here