Cannot call function library functions in blueprints
So, I've finally started doing some C++ work because I wanted to do some stuff that's apparently not possible in pure scripting or at least less neat.
As a starting point, I created a Function Library according to a few tutorials that I found online and created a few dummy functions to test the functionality first. Now, my issue is that, after compiling, (which, by the way, behaves very erratically and often throws out errors for code that it compiles perfectly fine on a second attempt) I don't see the functions anywhere in my blueprint context menu and neither do I see them in the "Palette" view. Yes, I also tried to uncheck "context sensitive".
I only have a header right now, because I am assuming that an actual implementation of the functions is not strictly necessary to make the them appear in the editor, as doing an implementation while testing in another project didn't help either. If an implementation actually is required, it would be nice to know, though.
I made three functions to test if any of the blueprint-related parameters would produce different results, and also tested if making the functions explicitly static would change anything. Which it does, by giving me a "error C2352: 'UObject::FindFunctionChecked': illegal call of non-static member function" error, even though the tutorials do use the static keyword.
The Enum also doesn't appear, but I'm not sure if it's supposed to or if there's even a way to include a C++ Enum on the blueprint side. The library is in the root folder of the C++ classes list. The shared category of Enum and the functions shouldn't be the cause of the issue, as I originally didn't have a category for the former.
I have seen a few posts on the topic of this issue, but most resolved with a "I restarted the editor", which doesn't work for me. In fact, I tried this in two UE versions of the same project, as well as a newly created project just for testing this one thing. As an aside, in the 4.11 version of my current 4.12 project, using the "New C++ class" functionality made a file that doesn't appear in the content browser, while the 4.12 version had no such issue.
asked Jun 22 '16 at 04:26 PM in C++ Programming
UFUNCTION needs to reference your implementation function. So, at the very least, I'd include a *.cpp with an empty implementation.
Get this working with your BlueprintCallable function only. Then add in the others (note: BlueprintNativeEvent needs an _Implementation function).
An important note. The editor might not pick this up immediately and will need to be restarted & potentially compiled through the editor (just confirmed this on my end).
Hope that helps. Ping if you need more assistance.
Here's what you're looking for. I don't think Events can be static because of the way the functions need to be referenced in order to manage events.
Follow this question
Once you sign in you will be able to subscribe for any updates here