Repository navigation
fix(unreal): use FProperty constructors without EObjectFlags on UE 5.8 - #2364
Merged
chexiongsheng merged 1 commit intoSep 20, 2026
Merged
Conversation
UE 5.8 deprecates the FField/FProperty constructors that take an EObjectFlags argument (C4996, "remove that parameter ... otherwise your project will no longer compile" on the next release). ContainerMeta.cpp now selects the constructor through PUERTS_NEW_PROPERTY, gated on ENGINE_MAJOR_VERSION > 5 || (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 8), so the module compiles without deprecation warnings on 5.8 and is unchanged on earlier engines.
Closed
kbrizov
added a commit
to kbrizov/puerts
that referenced
this pull request
Sep 10, 2026
…nt#2365 Tencent#2366) All fork-local changes on kbrizov master (ContainerMeta constructor gate, reserved-word escaping, ProcessMulticastDelegate gate) are superseded by the merged PRs or by Tencent's own fixes; conflicts resolved by taking heitara's version throughout. Resulting tree is identical to heitara master.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
UE 5.8 deprecates the
FField/FPropertyconstructors that take anEObjectFlagsargument. Every property created inContainerMeta.cppused that overload, so building the JsEnv module on 5.8 produced 14C4996warnings with the note that the parameter must be removed before the next engine release. This PR switches those call sites to the two-argument constructor on 5.8 and later, and leaves earlier engines untouched.Changes
ContainerMeta.cpponly:PUERTS_NEW_PROPERTY(Type, Owner, Name)expands tonew Type(Owner, Name)whenENGINE_MAJOR_VERSION > 5 || (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 8), and to the existingnew Type(Owner, Name, RF_Transient)otherwise. It is#undef'd at the end of the file.new F…Property(…, RF_Transient)expressions (bool, byte, int, float, double, int64, string, text, name, object, struct, enum, the enum's underlying byte property, and the byte-enum property) now go through the macro.RF_Transienton 5.8 is correct: 5.8 also deprecatesFField::FlagsPrivate, which is superseded byFProperty::PropertyFlags, and this file already sets those viaCPF_*.No behaviour change is intended on any engine version.
Verification
Full Development editor builds from a clean
Intermediate/andBinaries/on Windows, Epic Launcher engines, default V8 9.4.146.24, warning lists compared line by line against the unmodified plugin:ContainerMeta.cppC4996warnings. No warning was added.Notes for reviewers