This is a thread where you can share your research, solutions, and questions as you are upgrading to 4.16!
If you have an issue that may not be entirely related to code but is clearly a 4.16 upgrade issue you can also post it here and see if anyone else has had a similar experience.
Thanks for starting one of these kind of threads again Rama!
It seems some things got changed code wise for sequencer. Variable “tokens” in FMovieSceneTrackIdentifier turned private and FMovieSceneExecutionTokens::FEntry is now a private struct. Is there any way to still access these tokens and work with them? Would love to know to get FaceFx working on 4.16 as soon as possible
Not strictly C++ related, but I’ve just wasted a heap of time trying to track down why the Generate Project Files command is silently failing for some of my 4.16 projects.
Turns out it’s because of dependencies on plugins that are not yet installed for 4.16 (which makes sense and was the case with previous versions too) but changes to UBT in 4.16 seem to have resulted in the error dialog not being shown, so you just get a silent failure.
So, for anyone experiencing the same issue, remember that the likely cause is plugin references inside your .uproject file. If you disable them there until the 4.16 plugin is available, you should be able to generate the project files.
I am getting this build error coming from 4.15.2 to 4.16. Module constructors should take a ReadOnlyTargetRules argument (rather than a TargetInfo argument) and pass it to the base class constructor from 4.15 onwards. However, I changed my project build.cs to have public Project(ReadOnlyTargetRules Target) : base(Target).
Edit: Nevermind, it was found in a plugin i am using.
Here’s a couple of findings from me. I’ve switched my project to 4.16 a while ago so I might be missing some bits. GenerateProjectFiles.h will complain in any case.
public class MyGame : ModuleRules
{
public MyGame(ReadOnlyTargetRules ROTargetRules) : base(ROTargetRules)
{
}
}
This is how MyGame.Build.cs looks now.
In MyGame.Target.cs, SetupBinaries() is no longer needed. Instead, in the constructor, below Type = TargetType.Game, you do this:
Has anyone had any difficulty getting custom vars for Post Process showing up? My new variables in Scene.h don’t seem to be appearing in the Details Panel. I suspect Post Process Volumes / Cameras now have a custom Detail Panel class, but I’m struggling to find it anywhere…
“The TargetRules.SetupBinaries() callback has been deprecated. Instead of overriding this, targets may override the launch module through the “LaunchModuleName” property in their constructor, and add extra modules to the “ExtraModuleNames” field on the TargetRules object itself.”
I’m having this deprecation warning but I can’t seem to figure out how i should change it to the new standard:
I was using an FStreamableManager property in GameInstance class to load assets dynamically. This seems to no longer work in 4.16. I get the following error.
C:/UEProjects/CCam/Source/CCam/GamePlay/MainGameInstance.h(23): error : Unrecognized type 'FStreamableManager' - type must be a UCLASS, USTRUCT or UENUM
This was working in 4.15. How do I fix this? Tried adding a header for StreamableManger no luck.
Just remove the UPROPERTY line above it. It’s no longer a reflected type, but since it had nothing exposed to blueprints anyway, this shouldn’t have any effect on your project.
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.
Hello everyone! It’s already written, but I want to collect all in one heap and show you this visually.
How to transition your C ++ project from 4.15 to new features 4.16 and get rid of the warnings about of deprecated functions.
Could you or someone show the complete and working target.cs file? I can’t get anything to work with 4.16, it only throws compile errors.
Edit: Well I’ve solved most critical errors, but whats up with this warning:
“Warning Module constructors should take a ReadOnlyTargetRules argument (rather than a TargetInfo argument) and pass it to the base class constructor from 4.15 onwards. Please update the method signature.”
TMaps with custom structs (as key) now need to explicitly implement *GetTypeHash * or supply custom key funcs for the struct. Previously it was sufficient if your parent struct implemented it, now it has to be defined for each struct it seems.
For reference here’s a snippet from FGameplayTag:
/** Used so we can have a TMap of this struct */
FORCEINLINE friend uint32 GetTypeHash(const FGameplayTag& Tag) { return ::GetTypeHash(Tag.TagName); }
For reference (and easy googling!) here’s the actual error: TMap must have a hashable KeyType unless a custom key func is provided.
using UnrealBuildTool;
using System.Collections.Generic;
public class BrickSpaceTarget : TargetRules
{
public BrickSpaceTarget(TargetInfo Target) : base(Target)
{
Type = TargetType.Game;
ExtraModuleNames.Add("BrickSpace");
}
}
using UnrealBuildTool;
using System.Collections.Generic;
public class BrickSpaceEditorTarget : TargetRules
{
public BrickSpaceEditorTarget(TargetInfo Target) : base(Target)
{
Type = TargetType.Editor;
ExtraModuleNames.Add("BrickSpace");
ExtraModuleNames.Add("BrickSpaceEditor");
}
}
That’s a great reply. Unfortunately it seems that the error “identifier “FDrawingPolicyRenderState” is undefined” still pops from time to time. What I found out is that the error is only intellisense error. It doesn’t affect the compilation.
If you leave it out, only the game module will be compiled when building for development editor config.
Of course if your game doesn’t have an editor module, you can’t really compile one
This was working perfectly fine with 4.14 and 4.15.
Today I upgraded my project to 4.16 and now the asset registry is giving me an array with all it’s entries duplicated.
For example, if my maps are “Map1”, “Map2”] then AssetRegistry.GetAssets() gives me “Map1”, “Map1”, “Map2”, “Map2”]