Adding modules to C++ script

Hey guys,

Im trying to make a script that uses the function GetPolygonGroupMaterialSlotNames() from StaticMeshAttributes.h i believe that this is in a different Module down to the fact i am getting an error to do with a unresolved external symbol at the call.

I was wandering if anyone could explain how I can add the module to my CPP file to resolve the issue would i need to create a private and public folder etc or is it possible to just Macro it in in some way.

Module is StaticMeshDescription.

In your source folder, you have a folder with your project name on it, and inside it there should be “projectname.build.cs”. Open it, and in the PublicDependencyModuleNames.AddRange() add the “StaticMeshDescription” inside of it.

I did not test it myself, however, this is how you add your own custom modules or other engine modules into the project for C++ access. Within my own modules I use PrivateDependencyModuleNames with very similar syntax.

1 Like

Hey JoSf,

It took me a while but yer this was the issue soon hah thankyou for that :slight_smile: