Calling C++ Material Functiin Libraries

Hi. I’ve created a basic C++ function library, which is appearing in Actor Blueprint etc but not in the material editor. I thought I’d be able to call it just like a BP function as a node, can you tell if this is possible?

Its currently declared as BlueprintCallable, but I couldn’t really find anything, help wise, specifically for calling it from a material. Thanks a lot. Kind regards. Pete.

How have you created that?

Sorry… I created a c++ class as a child of UBlueprintFunctionLibrary. Then I have a function declared within the class, with UFUNCTION(BlueprintCallable, Category = “Uber Functions”) static float …

It is appearing in actor blueprints just not in material blueprints.

I do not have any public: protected: private: sections and I have only included one extra lib, ImageUtils.h

I’m using visual studio community 2019 and its all set up right and there are no errors in the code, just a couple of lines to test that its working. Thanks again.

Materials aren’t blueprints. I would assume you would have to use UMaterialFunction but I have no idea how to use that.

Privacy & Terms