No announcement yet.

C++ 4.16 Transition Guide

  • Filter
  • Time
  • Show
Clear All
new posts

    Originally posted by brethar2 View Post
    My Wwise audio plugin is using a line that throws an error:

    public static string GetDefaultVersionFileName()
            return Path.Combine(UnrealBuildTool.UnrealBuildTool.EngineDirectory.FullName, "Build" + Path.DirectorySeparatorChar + "Build.version");
    It says that "UnrealBuildTool.UnrealBuildTool" is unaccessible due to its protection level"

    It also throws the error that .EngineDirectory is not valid

    I cannot find any documentation on the UnlrealBuildTool stuff though; it seems like they may have made it protected in 4.16? Is there a more preferred way to access the engine directory?
    Some key stuff in UnrealBuildTool lost its public class status in a January 30th merge (see UEBuildTarget.cs commit history).

    Personally I was using it for this in my Target.cs / Editor.Target.cs:

    List<DirectoryReference> AllGameFolders = DiscoverAllGameFolders();

    Fortunately I can derive what I need from some of the new variables like "ProjectFile" that were added to TargetRules (from which all Target.cs inherit):

    string PROJECT_PATH = DirectoryReference.FromFile(ProjectFile).ToString();

    There's definitely some lost access here that kinda sucks, but I managed to get it working for my purposes. Hopefully you will, too.
    Former Technical Designer @ Irrational Games, gone Indie.
    Technical Designer for: Bioshock Infinite, Mars 2030
    Programmer/VFX for: Perception, The Black Glove's Kickstarter
    Voiceover Editor for: Bioshock, Bioshock Infinite


      Does anyone else experience out-of-date build information after moving his project to 4.16?
      When I hit build (and it builds fine) the UHT does not seem to switch out the debug files and executables with the most recent version. And if I want to debug my code, it says that the breakpoints are not going to be hit because the source files do not match the original version (that's being debugged).
      It works fine though if I delete all files manually, regenerate project files and hit build.

      Help would be much appreciated!


        Originally posted by eyoli View Post
        Hi, I have the following issue since upgrading my project to 4.16, using Visual C++ 2015: when the Unreal Editor is launched, the build from within Visual C++ (CTRL+SHIFT+B) fails with strange errors (see below). If I close the Unreal Editor then I can compile fine from Visual C++. I didn't have that problem with 4.15, I could build either from VC++ or Unreal when both were open.

        Error (active) identifier "FDrawingPolicyRenderState" is undefined

        e:\UE_4.16\Engine\Source\Runtime\Engine\Public\SceneManagement.h 1560
        Error Failed to produce item: mygame-Win64-DebugGame.lib

        Error MSB3075 The command "E:\UE_4.16\Engine\Build\BatchFiles\Build.bat mygame Win64 DebugGame "E:\Unreal Projects\mygame \mygame .uproject" -waitmutex" exited with code 5. Please verify that you have sufficient rights to run this command.
        I have the same problem since I upgraded from 4.14 to 4.16, before that it never came up.
        The actual error inside SceneManagement.h seems to change (I had the same error "identifier "FDrawingPolicyRenderState" is undefined" before, but now :
        Error (active)	declaration is incompatible with "FLogCategoryLogBufferVisualization LogBufferVisualization" (declared at line 47 of "c:\Program Files\Epic Games\UE_4.16\Engine\Source\Runtime\Engine\Public\SceneManagement.h")
        Rebuilding the solution then builds it successfully.

        Somebody has an idea what the issue could be? It's quite annoying having to rebuild constantly :-/

        I'm using Visual Studio 2015 btw,
        is this still the recommended version, or should I already upgrade to 2017 for 4.16?


          I've noticed a serious memory leak in Crash Reporter after upgrading to 4.16. Within seconds it eats all my ram and freezes my PC entirely. Only restart helps.

          Example event: Tried to get a custom component from a Character pointer which was null, reporter process pops up but there's no crash window. In 5 secs everything dies.

          Cleaning and rebuilding neither the engine or my project worked. Had to clone the repo again a build again. It works now.
          Last edited by Iceey; 06-04-2017, 01:26 PM.
          BP/C++ Programmer
          Main developer of Ascension Of Heroes. @AscensionOfHeroes


            I get this compile error in D3D12StateCachePrivate.h on this line:
            D3D12_STATE_CACHE_INLINE void FD3D12StateCacheBase::SetPipelineState(FD3D12PipelineState* PSO)

            The class name is included in the function definition. I removed it and it now compiles. Did I get the right build? How is anyone building this?

            Also, I'm getting crashes in FShaderResource::FindOrCreateShaderResource which calls FShaderResource::FindShaderResourceById and fails the assert on IsInGameThread(). This happens when creating a new Material and adding TextureSampleParameter2D for example. My build has some changes, but nothing that affects the thread that shader resources are used in. Anyone know what would cause this?

            I ran this in debug mode and the main thread and RenderThread 5 are running at the same time. RenderThread 5 is calling FindOrCreateShaderResource from FinishCompileShader. Currently, ENamedThreads::RenderThread is set to ActualRenderingThread, not GameThread, so that assert can never pass. Anyone know what this is all about?
            Last edited by AlienRenders; 05-29-2017, 11:36 PM.


              I got this while trying to migrate to 1.16:

              error MSB3075: The command "C:\libs\UnrealEngine\Engine\Build\BatchFiles\Build.bat CrossCompilerTool Win64 Development -waitmutex" exited with code 5. Please verify that you have sufficient rights to run this command.

              Running the command by hand gives me this:

              ERROR: Couldn't find target rules file for target 'CrossCompilerTool' in rules assembly 'UE4Rules, Version=, Culture=neutral, PublicKeyToken=null'.
              Location: C:\libs\UnrealEngine\Engine\Intermediate\Build\BuildRules\UE4Rules.dll

              I can still open the editor btw.
              Anyone fixed this one?



                I'm finding the UE 4.16 editor to be completely unstable. Keeps crashing when you do anything with the material editor. I haven't tried the other editors yet.


                  I agree anyone else having odd crashes? Im getting them on just calling GetWorld info like 5 seconds after the world is loaded.

                  Its called 5 seconds after the actor has been created fully
                  Last edited by Dark583; 05-30-2017, 10:29 PM.
                  Cepheus Protocol


                    Originally posted by AlienRenders View Post
                    I'm finding the UE 4.16 editor to be completely unstable. Keeps crashing when you do anything with the material editor. I haven't tried the other editors yet.
                    I've been in the material editor quite a bit and I've been good... You should consider posting on the answerhub and provide more details... If its a bug, I am sure others may have this happening...

                    "A little bit of nonsense now and then is cherished by the wisest men..."
                    -- Willy Wonka

                    Smooth Zoom Camera Plugin for 4.22 here.


                      Originally posted by Dark583 View Post
                      I agree anyone else having odd crashes? Im getting them on just calling GetWorld info like 5 seconds after the world is loaded.
                      It's nothing to do with GetWorld, from within DetermineCover you're calling a method on a NULL AAIController_Base object.


                        Upgrading my *Build.cs file in order to support ReadOnlyTargetRules parameter (eg. "MyModuleRules(ReadOnlyTargetRules Target) : base(Target)") I have an error using
                                UEBuildConfiguration.bForceEnableExceptions = true;
                        because 'MyModuleRules' now is read only.. Where I can put my code in order to enable exceptions?


                          Simplifying to this helped. Thanks! If you create a new project you'll also see this is the generated format.


                            If you have a problem to use steam on dedicated server, remove this code from /Engine/Plugins/Online/OnlineSubsystemSteam/Source/Private/OnlineSubsystemModuleSteam.cpp.
                            UE4 seems not to support steam on 64 bit yet. Game client is fine. But not dedicated server. It was disabled on 4.15.

                            void FOnlineSubsystemSteamModule::LoadSteamModules()
                            #if 0 //64 bit not supported well at present, use Steam Client dlls
                            	if (IsRunningDedicatedServer())
                            		SteamServerDLLHandle = FPlatformProcess::GetDllHandle(*(RootSteamPath + "steamclient" + Suffix + ".dll"));
                            Entry point not found - steamclient64.dll
                            Click image for larger version

Name:	EntryPointNotFound.png
Views:	1
Size:	7.7 KB
ID:	1128930
                            Last edited by WoodsShin; 05-31-2017, 11:41 PM.
                            Advanced Steam Plugin | UPNP Plugin | GameLift Plugin | Steam Inventory Plugin


                              Unreal keeps crashing on me and idk if it's because I need to do something different in 4.16.

                              I have a uobject that i constantly GetDefaultObject from and call functions on it. The point was to make blueprint children and override it's functions so I wouldn't need to make instances everytime. Calling a function froma c++ child works as intended but calling a function from a bp one crashes the engine.

                              So does anyone know if the syntax changed from 4.15 to 4.16? Because it worked perfectly before.
                              YouTube channel:


                                I'm having a big problem with packaging in 4.16; the packaging process stucks on this line:
                                UATHelper: Packaging (Windows (64-bit)): Cook: Execution of commandlet took:  88.30 seconds
                                it seems to be all ok, but after one hour it does not finish... I tried many times, tried also to uninstall and reinstall the whole engine; restarted the pc; verified the engine... Nothing...
                                It worked (and works) with 4.15 and get stucked with 4.16...