Is this a compilation error or an intellisense error? Intellisense often will report false errors if you haven’t compiled at least once to get the .generated.h files created.
Also, did you include “HTTP” to your module Build.cs public or private dependencies, like the example below?
Does your project compile at all? Also, how did you add new class? Did you use the editor’s “create new C++ class” or did you do it directly in Visual Studio?
If you’re adding this to the [project]Character.h file, are you adding the include above or below the .generated.h" line? Unreal Header Tool (UHT) looks for .generated.h as the last include in the list so if you have other includes after this then it will cause compile errors. Moving the include for HTTP above the .generated.h should fix the compile issue if this is the case. If you are still getting a compile error can you post the full output log from Visual Studio?
Yep. This is a default class with only one line added. Strangely, just pressing “enter” and “save” breaks the code in the exact same way.
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "PaperCharacter.h"
#include "Http.h"
#include "LEETDEMO2Character.generated.h"
// This class is the default character for LEETDEMO2, and it is responsible for all
// physical interaction between the player and the world.
//
// The capsule component (inherited from ACharacter) handles collision with the world
// The CharacterMovementComponent (inherited from ACharacter) handles movement of the collision capsule
// The Sprite component (inherited from APaperCharacter) handles the visuals
class UTextRenderComponent;
UCLASS(config=Game)
class ALEETDEMO2Character : public APaperCharacter
{
GENERATED_BODY()
[[[[[[[[ TRUNCATED ]]]]]]]]]
};
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
public class LEETDEMO2 : ModuleRules
{
public LEETDEMO2(TargetInfo Target)
{
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "Paper2D", "HTTP" });
}
}
Another update… It turns out that this behavior still continues, even with FMOD disabled… But I did find a workflow that is annoying but works:
change header file in VS, and add any new #include
save
build
close VS
open ue4 project editor
compile
refresh visual studio project
open visual studio
I had this same problem and after 30 minutes of frustration trying to get this to work, I deleted all the code from the header file and then undo which somehow fixed it