Skip to content

Conversation

@MothDoctor
Copy link

This straightforward code update allows the plugin to compile while the project's Target.cs is set to disallow raw UPROPERTY pointers with NativePointerMemberBehaviorOverride = PointerMemberBehavior.Disallow;. This setting becomes common in projects upgraded to UE 5.5 release.

Unreal Engine 5: TObjectPtr upgrade

There's only one kind of logical change. Can't use reference to object list in FModioCommandListBuilderMulticast declared in IModioUICommandMenu.h, as it's not possible to convert in-place TArray<TObjectPtr<UObject>> into TArray<UObject>&. We would have to create a temporary TArray<UObject> and pass it to the delegate, which would defeat the purpose of pass-by-reference.

@stephenwhittle
Copy link
Collaborator

Thanks for this! It landed a bit late in our cycle to be included in the 2025.4 release but we'll look at pulling this in for the next one.

@MothDoctor
Copy link
Author

No worries, I've used this PR as an advanced issue report.

Take time to check if this reference removal doesn't break anything. It looks a bit weird, but it might be used somewhere in the example content. I cannot fully test it at the moment, as it takes a while to build a functional UI.

@stephenwhittle
Copy link
Collaborator

This should be addressed by the v2025.5 release, let me know how you go with it and we'll get the PR closed out :)

@MothDoctor
Copy link
Author

This should be addressed by the v2025.5 release, let me know how you go with it and we'll get the PR closed out :)

Great! We're almost there, two raw pointers remain in v2022.5.
I just updated my PR, and only two files are left.

@MothDoctor
Copy link
Author

PR not fully included, so it doesn't compile in project without plugin modification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants