Skip to content

Conversation

@rsoudani
Copy link

Summary

Unreal Engine 5.6 deprecated ModuleRules.UnsafeTypeCastWarningLevel.
This PR migrates it to the new ModuleRules.CppCompileWarningSettings.UnsafeTypeCastWarningLevel API.

Motivation

Building the plugin on UE 5.6+ currently emits CS0618 deprecation warnings.
This change removes those warnings while keeping behavior identical.

Implementation

  • Added version-guarded macros:
    • UE_5_6_OR_LATER → use CppCompileWarningSettings.UnsafeTypeCastWarningLevel
    • UE_5_0_OR_LATER → use legacy UnsafeTypeCastWarningLevel
  • Preserves the same strictness (WarningLevel.Error).
  • No runtime impact; Build.cs only.

Build & Validation

Built successfully using the documented workflow:

msbuild -p:UnrealEngine=5.6 -p:OutputPath=C:\_out\VSTUE_Build

✔️ Build succeeded with 0 errors.
ℹ️ Warnings observed:

  • Visual Studio 2022 compiler not preferred (informational).
  • C4996 deprecations in VisualStudioToolsCommandlet.cpp related to UClass::ClassDefaultObject
    (unrelated to this PR; can be addressed in a separate change by using GetDefault<>/GetMutableDefault<>).

@rsoudani rsoudani requested a review from a team as a code owner September 22, 2025 15:18
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.

1 participant