Use checks in shipping build, without modifying .Target.cs file

Hello,

I want to enable check() in shipping builds. The current way to do this is by modifying project’s Target.cs file like

//Project.Target.cs
if (Configuration == UnrealTargetConfiguration.Shipping)
{
    BuildEnvironment = TargetBuildEnvironment.Unique;
    bUseChecksInShipping = true;
}

The above method requires us to have source code of unreal engine for build, because of the BuildEnvironment=TargetBuildEnvironment.Unique setting. But, I do not want to do it this way, because having source code to build project as a requirement is bad for my project. Is there another way to use check() in shipping builds?

Cheers!

I have similar question. Did u find an answer?

#ifdef UE_BUILD_DEBUGGAME
return true;
#endif

#if UE_BUILD_DEVELOPMENT || UE_BUILD_DEBUG
return true;
#else
return false;
#endif