Hello,
I am discovering C++ in UE4. Until now, I was programming in Blueprint but for some reasons I have to create a C++ class (a blueprint function library) to merge my meshes together.
I have programming notion in C and some in C++ but with Unreal Engine I am very lost.
First, I discovered that the official documentation to do what I would like have a lot of errors and thanks to some similar questions on the answerhub I find how to solve them.
So now, I finally resolved all my issues but there is something that I don’t understand. In the official documentation to merge mesh (here : Working with Modular Characters | Unreal Engine Documentation)
Here is a sample of the code :
USTRUCT(BlueprintType)
struct PROJECTNAME_API FSkelMeshMergeSectionMapping_BP
{
GENERATED_BODY()
/** Indices to final section entries of the merged skeletal mesh */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Mesh Merge Params")
TArray<type> SectionIDs;
};
In this, they said that we should change the PROJECTNAME_API by the name of our project with _API at the end. I did it and it wasn’t working at all (almost 190 errors). I had syntax error, missing “;” or “)”… I also had problem with “FSkelMeshMergeSectionMapping_BP” that wasn’t defined and “Generated_body”.
I search a lot on the internet and finally I saw something where people where created struct without specify the “PROJECTNAME_API” so I deleted it and then everything work !
My question is : When do we need to specify the PROJECTNAME_API and when should we don’t ?
Thank you a lot !
All the best
So in fact, if I have written “LEVELDESIGN_API” it would have worked.