4.24 C++ Transition Guide

Anyone getting this error when building a linux server with 4.24.2? “ERROR: Server targets are not currently supported from this engine distribution.”

This is from a command line driven build using UnrealBuildTool.exe <project> Linux Shipping

Worked before I updated to 24.

I installed the latest Linux compiler : Cross-Compiling for Linux | Unreal Engine Documentation and tested that it is the correct version.

I have cleaned, rebuilt all, etc. I can’t find much documentation about this error and it is the only error I get when building. The game client builds and works great.

Ī’ve always been told by people with published multiplayer games that you need to use an engine source build to create a dedicated server build. I don’t know what the specific issue is, but it seemed like that’s all you had to do and it would work.

So, for now, no way to generate C++ classes correctly in UnrealEditor with new build settings enabled? Manual work needed. Example:

  • Create an empty C++ project
  • Create any class in UnrealEditor inside some subfolder with public/private structure enabled
  • Build failed because of default header has the name “ActorName.h”

Not convenient… And definitely it is not correct behavior, because the build failed.

Every time you need to add a full classpath to the header or add PublicIncludePaths.

If using **GetComponentsByClass **in C++ , Epic wrote following “This intended to only be used by blueprints. Use GetComponents() in C++.”

OLD code



TArray<UActorComponent*> OwnersComponents = ComponentOwner->GetComponentsByClass(UShapeComponent::StaticClass());


NEWCode



TArray<UActorComponent*> OwnersComponents;
        ComponentOwner->GetComponents(UShapeComponent::StaticClass(), OwnersComponents,false);


1 Like

GetAnimationTrackIndex is no more a part of USkeleton, there is the GetRawAnimationTrackIndex, but it is not a 100% replacement, how can I still get the same output if I dont want to use RawData?

Tried migrating a project from 4.22 to 4.24.3, and all the engine includes are now broken. #include “CoreMinimal.h” for example does not work anymore unless I type in the full directory “Runtime/Core/Public/CoreMinimal.h”. And when I create a new project there is no include problems at all.

I honestly couldn’t find anything to fix this issue

@Wolfie_v7
It won’t happen if you’d opt-out from BuildSettingVersion.V2 by commenting out appropriate line in your Target.cs
4.24 suggest adding this, I added that, seen these issues, commented out for now :wink:

Hi guys having some trouble saving and reading


FGameplaytagContainer

to binary file. It apparently only takes in a


FStructuredArchive:Slot

. I’m a little confused as to how go about creating one and saving it to a file. I’m doing this for a plugin to save it out to just a binary file and trying to read that back in

Where do I put the code below? (i.e the code provided by El-Magic 16)

After 4.24:



 "Modules": 
{
"Name": "Debug", [INDENT=3]**"Type": "DeveloperTool",**[/INDENT]
 "LoadingPhase": "PreDefault",
"WhitelistPlatforms": 
"Win64",
"Win32",
"Mac",
"Linux"
]
}
]


[/QUOTE]

Hi,

since 4.24 has deprecated GetComponentsByClass, does anyone have any clue how to write elegant oneliners when getting components? For example getting a count of components of certain type used to be quite trivial, but with the new method, it seems extremely overcomplicated and clumsy.

For example, previously:



int32 InstancerCount = GetComponentsByClass(UHierarchicalInstancedStaticMeshComponent::StaticClass()).Num();


Now:



TInlineComponentArray<UHierarchicalInstancedStaticMeshComponent*> Instancers;
GetComponents(Instancers);
int32 InstancerCount = Instancers.Num();


Am I missing something? This doesn’t feel right, because generally, changes are made towards more modern, cleaner code. Not backwards, towards the old C times of coding :confused: Having no ability to get array of components of specific class without the out parameter solution feels very limiting.

Has anybody been able to compile unrealCV for 4.24?

By making this change (BuildConfiguration is inaccessible in 4.19 - AnswerHub - Unreal Engine Forums) it partially compiles, but fails with an Object.h no such file or directory errors.

Thanks