C++ 4.14 Transition Guide

Hi all,

An easy one, but just in case :slight_smile:

UWorld::GameState is now private, so


GetWorld()->GameState

will give you an error:


Error	C2248	'UWorld::GameState': cannot access private member declared in class 'UWorld'

You can now use


GetWorld()->GetGameState()

instead.

Cheers
Cedric


UPROPERTY()
TArray<FName> AnimationTrackNames;

in UAnimSequence is protected now

If you protect something, Epic, then please give us a method to get the property.
This prevents me from updating my animation tools to 4.14.

If a plugin inside the project(Inside project folder) is enabled and I play the game in standalone, it crashes upon pressing any key.

Is not solved yet?

Hi,

Itā€™s not a standard ā€œtransitionā€ question with build issue but more with process changes:

Does that means that the cook content can be shared accross platform as per this trello card: Trello ?

I canā€™t have any anwser on the official thread, so I hope someone here is able to answer / confirm this.
This will clearly help in the cooking process if I have only 1 content cook for all platforms.

Thanks!

That would be great if that were so, would make patches across multiple platforms a lot easier :slight_smile:

Rama

I hope someone @epic will anwser us on this. This is a time saver for everyone that start distributing their game ^^

Our project wonā€™t load under 4.14 a pop-up error box is shown -> ā€œThe game module ā€˜blahblahā€™ could not be loaded. There may be an operating system error or the module may not be properly set up.ā€
Some moments later later there is a crash in the destructor of UNavigation() and the output of ā€œIllegal call to StaticFindObject() while collecting garbage!ā€
Iā€™m not convinced the crash is the problem, more like a side-effect.

Anybody have any ideas of what the problem is or a tried and true approach to debug this? Thanks.

  • David

By a process of elimination, if I disable our Wwise plugin we can load OKā€¦ The Wwise plugin works in a 4.14 ā€˜toyā€™ project but not in our project. Iā€™m suspecting something in our blueprints specifically in our game.

It kinda looks that GetBodyInstance() got changed too? Im trying to use the TraceComponent function and it works unreliably

This is my result in 4.14 just by using draw debug line

And this is the result of the actual hit locations

Every other trace function works fine except trace component

Like DavidGalloway, while loading the project I get ā€œThe game module ā€˜blahblahā€™ could not be loaded. There may be an operating system error or the module may not be properly set up.ā€
With debug I found that the problem is that the windows api function LoadLibraryW fails to load the project dlls (I have two modules and both dlls fail), so I guess something is wrong with their compilation, but I donā€™t know what to try now.

DavidGalloway and matfer, I had a similar problem, though I am running on Linux. I think the error message that the editor displayed in a pop up was similar to what you have both written, but the message was not saved in the logs as such.

Hereā€™s the what I did find in the logs:

LogLinux:Warning: dlopen failed: /path/to/project/Binaries/Linux/libUE4Editor-project.so: symbol _ZThn1064_NK5APawn24GetNavAgentPropertiesRefEv, version UE4 not defined in file libUE4Editor-Engine.so with link time reference
LogModuleManager:Warning: ModuleManager: Unable to load module ā€˜/path/to/project/Binaries/Linux/libUE4Editor-project.soā€™ because the file couldnā€™t be loaded by the OS

I resolved it by renaming /path/to/project/Binaries/Linux/libUE4Editor-project.so (I did not want to delete it in case it was the wrong thing to do) and restarted the editor for the project in question. The editor asked me if I wanted to build the missing .so which I let it do and that fixed it.

If this is the same problem you are seeing, I expect youā€™ll find the relevant .dll under /path/to/project/Binaries/Win64/libUE4Editor-project.dll. Try renaming that and restarting the editor (probably best to not be in the editor when you rename that dll).

I am also trying to port a custom IK node, and am running into linker issues for FAnimNodeEditMode. Would you mind sharing your included modules?

Errrā€¦ Getting this weird error from 4.14:

ā€œfatal error C1083: Cannot open include file: ā€˜ObjectBase.hā€™: No such file or directory.ā€

Am I missing something from the engine?

My problem seemed due to project plugins not being compiled or loaded, and I solved enabling all my project plugins in the .uproject. Maybe older versions used all project plugins by default, while 4.14 needs them to be enabled explicitly.

Lots of people who got hit by Navigation changes here, but none who had problems with the changes in inheritance?

https://answers.unrealengine.com/questions/531791/how-do-i-work-with-vehicle-navigation-in-414.html

I can most likely solve it by taking UWheeledVehicleMovementComponent and above into my own project and parent it to UPawnMovementComponent myself.
But it would be nice to know if it was an intended change and they want to do navigation differently or if itā€™s a bug that they will fix.

Does anyone know?

Iā€™m also seeing the ObjectBase.h error with a plugin. Any luck with this ?

Sorry, havenā€™t really investigate anything with object.h. We reverted back to 4.13 for now.

I have done something very similar but having problems linking the methods in FAnimNodeEditMode (referenced in my derived class in my own plugin).
e.g.
error LNK2001: unresolved external symbol "public: virtual bool __cdecl FAnimNodeEditMode::SetWidgetMode

I donā€™t have any issues with the associated UAnimGraphNode_SkeletalControlBase derived class, even though this UAnimGraphNode_SkeletalControlBase is in the same module as FAnimNodeEditMode.

Did you encounter any problems like this and/or do you have any idea where Iā€™m going wrong?

After further investigation, it seems that FAnimNodeEditMode is not exported. Iā€™m not sure if this is by design or an oversight, but the workaround we used was inheriting from IAnimNodeEditMode instead and copying whatever functionality was needed from FAnimNodeEditMode into our new class.

[Solved] cannot convert argument 1 from ā€˜UAnimMontage *ā€™ to ā€˜UObject *ā€™ ??

Hi all!
Well I am updating from ā€œ4.10.4ā€ to ā€œ4.14.1ā€ just now, looking at templates I easily fixed all the changes, except I canā€™t fix this one with contructor helpers while loading UAnimMontage (couldnā€™t find an example of that in the templates, this is normaly done with Animation Blueprint) , I get this error:


..\Epic Games\4.14\Engine\Source\Runtime\CoreUObject\Public\UObject\ConstructorHelpers.h(105): error C2664: 'void ConstructorHelpers::ValidateObject(UObject *,const FString &,const TCHAR *)': cannot convert argument 1 from 'UAnimMontage *' to 'UObject *'
...\4.14\Engine\Source\Runtime\CoreUObject\Public\UObject\ConstructorHelpers.h(105): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
...\4.14\Engine\Source\Runtime\CoreUObject\Public\UObject\ConstructorHelpers.h(98): note: while compiling class template member function 'ConstructorHelpers::FObjectFinder<UAnimMontage>::FObjectFinder(const TCHAR *)'
...JumpyFrogs\JumpyFrogsGameMode.cpp(92): note: see reference to function template instantiation 'ConstructorHelpers::FObjectFinder<UAnimMontage>::FObjectFinder(const TCHAR *)' being compiled
...\JumpyFrogs\JumpyFrogsGameMode.cpp(92): note: see reference to class template instantiation 'ConstructorHelpers::FObjectFinder<UAnimMontage>' being compiled
2>ERROR : UBT error : Failed to produce item: C:\Users\Jurif\Documents\UnrealProjects\JumpyFrogs 4.14\Binaries\Win64\UE4Editor-JumpyFrogs.pdb


My cpp is:


AJumpyFrogsGameMode::AJumpyFrogsGameMode()
{
static ConstructorHelpers::FObjectFinder<UAnimMontage> Idle(TEXT("UAnimMontage'/Game/Characters/FrogChar/Animations/Idle_Montage'"));
	if (Idle.Object != NULL)
	{
		IdleMontage = Idle.Object;
	}
}


And .h:


UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Animations)
	class UAnimMontage* IdleMontage;

SOLUTION:


#include "Animation/AnimMontage.h"


I also found this on answer hub, same issue/error but with destructibles, easily solved by adding :


#include "Engine/DestructibleMesh.h"

Happy Hollidays !!!