Dupelicating UFUNCTION BlueprintCallable not showing

Hi, I’m trying to add another function to a public UBlueprintFunctionLibrary. I want to build on an existing function, but not modify the original. I’ve done a simple copy and paste job but the function will not show in the editor.



class PROCEDURALMESHCOMPONENT_API UKismetProceduralMeshLibrary : public UBlueprintFunctionLibrary



UFUNCTION(BlueprintCallable, Category = "Components|ProceduralMesh")
static void GenerateCustomMesh(FVector Pos, FVector BoxRadius, TArray<FVector>& Vertices, TArray<int32>& Triangles, TArray<FVector>& Normals, TArray<FVector2D>& UVs, TArray<FProcMeshTangent>& Tangents);



void UKismetProceduralMeshLibrary::GenerateCustomMesh(FVector Pos, FVector BoxRadius, TArray& Vertices, TArray& Triangles, TArray& Normals, TArray& UVs, TArray& Tangents)


Any help would be much appreciated, it’s driving me mad!

You’re missing the “public” keyword between GENERATED_BODY() and your UFUNCTION.

Thanks for the reply. I tried adding public before UFUNCTION. Recompiled and built the project but I still cant get the function in blueprint.

Thanks for the reply, I’ve not pasted it into my own source. I have instead just directly modified the procedural mesh library. (Im assuming that editing the engine files is allowed)

I’m assuming you are putting this copy & pasted code into your own game module. Since you copy & pasted the code from UKismetProceduralMeshLibrary, you’ll also need to rename the class to something different so you don’t conflict with the engine’s class. Also, change the PROCEDURALMESHCOMPONENT_API to match your module’s API macro. It’s also okay to delete definition if your module isn’t being used by other modules.

What happens if you create a new function, such as an empty “void HelloWorld()”? Does that show up?
Are you also looking for the function within the right category? (Components → Procedural Mesh)?

In that case, UKismetProceduralMeshLibrary is in the ProceduralMeshComponent plugin. Make sure that this plugin is loaded for your project (Settings > Plugins > Rendering). Also, double check you are compiling the build target for the version of the editor you are running. You are likely running UE4Editor.exe, so you’ll need to be compiling the Development Editor build target.