This is a place where you can post compiler errors you have resolved while transitioning from 4.10 to 4.11!
You can also post issues or questions here, challenges that you encounter while upgrading to 4.11 so that the whole community can assist you in one central location.
Hey! Thanks for the thread. So, the 4.11 update was seamless for me, except for one issue. When I regenerated the project it used VS2013 instead of VS2015. Has anyone run into that?
OK, so it looks like I have something enabled for Android and because of that it forces a max version of VS2013. Passing -2015 to UnrealBuildTool will force it to generate a VS2015 project.
Trying to Rebuild ~ “Epic was unexpected at this time”
Dear Community,
In 4.10 and 4.11, if you installed a fresh engine installation under “program files (x86)/Epic Games”, you will be unable to do a full rebuild via your VS .sln.
You will get the error
Epic was unexpected at this time
The reason is that “Epic Games” has a space in it and the old batch file for rebuild from Epic does not account for this
To fix this, here is the replacement .bat file!
Replace the contents of the old one here:
Engine/Build/BatchFiles/Rebuild.bat
with this:
@ echo off
REM %1 is the game name
REM %2 is the platform name
REM %3 is the configuration name
IF EXIST "%~dps0\Clean.bat" (
call "%~dps0\Clean.bat" %*
) ELSE (
ECHO Clean.bat not found in %~dps0
EXIT /B 999
)
IF EXIST "%~dps0\Build.bat" (
call "%~dps0\Build.bat" %*
) ELSE (
ECHO Build.bat not found in %~dps0
EXIT /B 999
)
Again please note this will only affect you when you do a fresh engine installation, it is not specifically tied to the 4.11 transition from 4.10, but I figured I’d put it here since I’ve now verified this issue still exists in 4.11
Thank you for posting this ! I did not realize Epic had replied to my about this! (not sure if that’s where you got the solution but it’s all clear now)
Not sure if this is related to the 4.11 stable or not, but my packaged build went from about 360-370MB to 580MB without any real major asset additions. (An icon, a loading splash screen, and a few small speech files.) Anyone else notice an increase in package size? (Yes, if you really wanted to, you could honestly say that 4.11 made my package large.)
Right click on .uproject to generate project file is now stubborn to generate VS2013, even if UE is already compiled under VS2015. To force it to generate VS2015 solution file, I had to run (from some older VS2015 discussion threads):
I thought this was a rather cute and helpful addition in 4.11, regarding use of FMath::RandRange vs FMath::FRandRange
Now instead of floats passed into RandRange being turned into int32s and giving you strange results, when you’re expecting FRandRange behavior, the constructor will retain the full float values and give you proper result
/** Helper function for rand implementations. Returns a random number >= Min and <= Max */
static FORCEINLINE int32 RandRange(int32 Min, int32 Max)
{
const int32 Range = (Max - Min) + 1;
return Min + RandHelper(Range);
}
/** Util to generate a random number in a range. Overloaded to distinguish from int32 version, where passing a float is typically a mistake. */
static FORCEINLINE float **RandRange**(float InMin, float InMax)
{
return **FRandRange**(InMin, InMax);
}
/** Util to generate a random number in a range. */
static FORCEINLINE float FRandRange(float InMin, float InMax)
{
return InMin + (InMax - InMin) * FRand();
}
If you overwrote AActor::Tick and AActor::BeginPlay, your Actor will no longer Tick in 4.11 if you forgot to call Super::BeginPlay in your BeginPlay function.
More interesting news about AActor::Tick – actors now also tick in non-game threads if you let them.
In constructor:
PrimaryActorTick.bRunOnAnyThread = true;
This didn’t seem to do anything prior to 4.11, but now it works as expected, and can cause trouble if you do stuff that you should only do in game thread (eg spawn other actors)…