Controlling C++ Compile Optimization
Published on 03 Apr 2022
If you want to debug your code while you didn’t compile your project with the DebugGame setting.
You might end up with see an optimized variable in which you can’t see what’s in it.
In that case, you can disable optimization on a specific section of your code.
Like this.
#pragma optimize("", off)
void AVCharacter::NotOptimized()
{
//Some Codes
}
#pragma optimize("", on)
void AVCharacter::Optimized()
{
//Some Codes
}