I build the solution and it builds however the #include “ProceduralMesComponent.h” isn’t opened and UProceduralMeshComponent is still undefined. Any help?
I usually ignore what visual studio highlights because it’s wrong a lot of the time or hasn’t properly updated. As long as it builds I don’t think you should worry about it (Even though it can visually get really annoying).
I would do however in the .cpp I am using the pointer and because it’s undefined here. It doesn’t recognise it in the .cpp
Oh right. Uh besides that I don’t really see anything wrong, maybe someone else might have a clue.
I’d assume it’s because ProceduralMeshComponent is contained in a plugin. Have you verified that the plugin is properly referenced in the UE4 project? (Plugins/Runtime/ProceduralMeshComponent). I vaguely remember having to add some plugins I was using to my project’s build.cs file to get them to work. I don’t recall if that was an issue with getting intellisense to recognize it or if it was actually a full-blown compile problem, though.
i.e.
PrivateDependencyModuleNames.AddRange(new string[] { “ProceduralMeshComponent” }); PrivateIncludePathModuleNames.AddRange(new string[] { “ProceduralMeshComponent” });
I have a project where I’m using this successfully right now.
I added these to the module list:
“ProceduralMeshComponent”,
“RHI”,
“RenderCore”
in the header (ProceduralMap.h), I include
#include “GameFramework/Actor.h”
#include “ProceduralMeshComponent.h”
#include “ProceduralMap.generated.h”
in the .cpp I include:
#include “Project.h”
#include “ProceduralMap.h”
Is it failing the compile in the cpp or just failing to give you intellisense?
The answer was that I needed to re-associate my c++ files with the unreal project.
(in the project) File-> Refresh VisualStudio Project