-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use SetNum EAllowShrinking (UE 5.5 compatibility) #38
Conversation
ericwomer
commented
Jan 28, 2025
* Fixes for deprication warnings with update to 5.5.2 (5.5.1 also?) messages * Changes bool param for allowing shrinking to enum EAllowShrinking
Is compatibility with 4.27 checked? |
I don't have 4.27 Installed, eventually you will have to have two versions of this plugin one for UE5 and one for UE4, especially when then remove the deprecated features are removed, you could wrap it in #if blocks though. |
I am well aware, for now #if declarations will do, we will split when it will become necessary. |
Would something like this work for you?
// Setting Allow Shrinking via bool bAllowShrinking is deprecated in engines 5.5 and higher
#if ((ENGINE_MAJOR_VERSION > 4) && (ENGINE_MINOR_VERSION > 4))
DrawLists.SetNum(DrawData->CmdListsCount, EAllowShrinking::No);
#else
DrawLists.SetNum(DrawData->CmdListsCount, false);
#endif
// Setting Allow Shrinking via bool bAllowShrinking is deprecated in engines 5.5 and higher
#if ((ENGINE_MAJOR_VERSION > 4) && (ENGINE_MINOR_VERSION > 4))
// Reset buffer.
OutIndexBuffer.SetNumUninitialized(NumElements, EAllowShrinking::No);
#else
// Reset buffer.
OutIndexBuffer.SetNumUninitialized(NumElements, false);
#endif **EDIT The engine still threw warning about deprecation even though the code was unreachable so I wrapped it in pre-processor blocks |
Use the following preprocessor macros: UnrealImGui/Source/ImGui/Private/VersionCompatibility.h Lines 5 to 6 in 2f81668
Feel free to even add a definition for this specifically at the end. |
deprecation change went through in the engine.
I made the last push because the deprecation was introduced in January of 2024 but wasn't pushed to release until 5.4. |
Hey, Thanks 😄 |
Awesome! Thank you very much! |