Replace raw uobject ptrs with TObjectPtr for UPROPERTY#454
Conversation
|
fixes #453 |
|
Have you tested your fixes and saw no regression? |
|
I have just replaced raw UObject pointers with TObjectPtr. I did this because for me Code was not compiling without it. After doing this code is compiling successfully. I don't think it can cause any problems for engine version 5.0+. Are there any test cases which I need to run? |
|
What platform are you compiling for? UObject* is perfectly valid in 5.5 and shouldn't throw an error |
|
Actually there is NativePointerMemberBehaviorOverride property which we can set in Target.cs file, The project I am working in has set it to Disallow. So In my project UHT throws error if raw pointers are used as member variables. Also Epic recommends to use TObjectPtr too. |
|
From a quick read it appears to only modify editor behavior by tracking access, my guess is for easier debugging in editor modes, but serializes the same as raw ptrs. Seems harmless enough to merge. |
I have replaced Raw UObject pointers with TObjectPtr<> when used as UPROPERTY().