So I’ve been trying to mess around with paper 2D, just to get some experience with it, and I have run into several problems trying to write gameplay in C++ using the plugin.
At first I ran into trouble with VS not recognizing “#include PaperCharacter.h”, however, I quickly fixed this by adding the “Paper2D” module to my project.Build.cs file, and updating my VS include search path (Right Click on Your VS Project Name->Properties->NMake->Include Search Path) (I included the paths of Paper2D Classes: C:\Program Files\Unreal Engine\4.6\Engine\Plugins\2D\Paper2D\Source\Paper2D\Classes and C:\Program Files\Unreal Engine\4.6\Engine\Plugins\2D\Paper2D\Source\Paper2D\Public)
My VS now recognizes the PaperCharacter header, and all of the Paper2D Classes are listed under my external dependencies, but I am having a problem building my project still. It appears that VS cannot open the PaperCharacter.generated.h (found in PaperCharacter.h as “#include PaperCharacter.generated.h” ) source file (as noted in error 6-bolded below). I believe that this is causing the majority of my other errors, but I don’t understand why VS cannot seem to load this generated header.
I presently have one class (one header and one source file) called RPGCharacter which extendes APaperCharacter.
There is currently no code in this source or header file.
My errors are shown below. Any help in resolving this issue would be greatly appreciated.
Errors:
1 IntelliSense: identifier “FWindSourceSceneProxy” is undefined c:\Program Files\Unreal Engine\4.4\Engine\Source\Runtime\Engine\Classes\Components\WindDirectionalSourceComponent.h 20 2 RPG
2 IntelliSense: identifier “FOnSelectedLevelsChangedEvent” is undefined c:\Program Files\Unreal Engine\4.4\Engine\Source\Runtime\Engine\Classes\Engine\World.h 1929 2 RPG
3 IntelliSense: no instance of constructor “FReadSurfaceDataFlags::FReadSurfaceDataFlags” matches the argument list c:\Program Files\Unreal Engine\4.4\Engine\Source\Runtime\Engine\Public\UnrealClient.h 55 92 RPG
4 IntelliSense: no instance of constructor “FReadSurfaceDataFlags::FReadSurfaceDataFlags” matches the argument list c:\Program Files\Unreal Engine\4.4\Engine\Source\Runtime\Engine\Public\UnrealClient.h 63 87 RPG
5 IntelliSense: identifier “FMeshBatchElement” is undefined c:\Program Files\Unreal Engine\4.4\Engine\Source\Runtime\ShaderCore\Public\VertexFactory.h 488 131 RPG
6 IntelliSense: cannot open source file “PaperCharacter.generated.h” c:\Program Files\Unreal Engine\4.6\Engine\Plugins\2D\Paper2D\Source\Paper2D\Classes\PaperCharacter.h 5 1 RPG
7 IntelliSense: expected a ‘;’ c:\Program Files\Unreal Engine\4.6\Engine\Plugins\2D\Paper2D\Source\Paper2D\Classes\PaperCharacter.h 10 35 RPG
8 IntelliSense: a type qualifier is not allowed on a nonmember function c:\Program Files\Unreal Engine\4.6\Engine\Plugins\2D\Paper2D\Source\Paper2D\Classes\PaperCharacter.h 26 57 RPG
9 IntelliSense: expected a declaration c:\Program Files\Unreal Engine\4.6\Engine\Plugins\2D\Paper2D\Source\Paper2D\Classes\PaperCharacter.h 27 1 RPG
10 IntelliSense: “Super” is not a nonstatic data member or base class of class “ARPGCharacter” c:\Users\ \Documents\Unreal Projects\RPG\Source\RPG\RPGCharacter.cpp 8 4 RPG
11 IntelliSense: not a class or struct name c:\Users\ \Documents\Unreal Projects\RPG\Source\RPG\RPGCharacter.h 13 38 RPG
12 IntelliSense: variable “APaperCharacter” is not a type name c:\Users\ \Documents\Unreal Projects\RPG\Source\RPG\RPGCharacter.h 15 2 RPG