Since UE5.0 released, I haven’t been able to include/use UProceduralMeshComponent at all. Has the include directory changed? I can’t find a solution anywhere and I’ve tried restarting my project many times. I also checked if the procedural mesh plugin is still there and it is. If anyone could help that would be greatly appreciated.
UE5 documentation says:
#include "ProceduralMeshComponent.h"
Requiring module ProceduralMeshComponent
Reference:
As I said in the post, I included ProceduralMeshComponent.h but it doesn’t compile at all, saying it cannot find the file.
I just checked, the directory of the header file is correct in UE5.0 , nothing odd there.
Do you have “ProceduralMeshComponent” added to the ‘PublicDependencyModuleNames’ in your ‘ProjectName.Build.cs’?
Thank you both for the suggestions. Adding ProceduralMeshComponent to PublicDependencyModuleNames solved my issue!
How do I add it to the PublicDependencyModuleNames?
I had a problem where adding “ProceduralMeshComponent” to PublicDependencyModuleNames in Build.cs wouldn’t fix the issue and I still couldn’t include ProceduralMeshComponent.h.
It seems regenerating the Visual Studio project files (by right-clicking the .uproject file and selecting ‘Generate Visual Studio Project Files’) fixed the problem. After regeneration, ProceduralMeshComponent.h could be found, and everything compiled. Maybe it didn’t pick up my addition in Build.cs before? No idea.
Posting this in case anyone else encounters the same situation.
I had the same problem. Thank you for the solution!
Thanks, helped me too.