In the header file of my actor I have UProceduralMeshComponent* Mesh however it’s saying that UProceduralMeshComponent is undefined.
In the .build I have added ‘ProceduralMeshComponent’ to the PublicDependencyModuleNames. Not sure what else I need to do. Any help guys?
You need to add the appropriate include to your header file.
Something like:
#include "ProceduralMeshComponent.h"
Have you tried to rebuild or delete de binaries?
You may need to fully quality the path to where ever it thinks it is.
Try
#include "ProceduralMesh/ProceduralMeshComponent.h"
or
#include “Plugins/ProceduralMesh/Public/ProceduralMeshComponent.h”
When a class is undefined, that’s the compiler telling you it doesn’t know what that class is (hence undefined). The fix is to properly add the include/any additional libraries. If you added the ProceduralMesh plugin to your .Build.cs file and regenerated your solution - you should have all the appropriate references setup and can now link the ProceduralMeshComponent.h so the compiler can find it.
No that’s not it. I’ve tried to add the header however it’s saying the .h doesn’t exist
This is the error i seem to get when i #include “Plugins/Procedural…”
Error C1083 Cannot open include file: ‘Plugins/ProceduralMesh/ProceduralMeshComponent.h’: No such file or directory Dissertation_2 c:\documents\unreal projects\dissertation_2\source\dissertation_2\Terrain.h 5
Actually could the issue be that I was not placing he #include in between the Framework and .generated? It sems to build successfully however the ProceduralMeshComponent include still ahs the red line under it and so does the pointer to proceduralMeshComponent.
The issue was that I had to refresh the visual studio project via the unreal project