I’ve been recently using Session Frontend to start error checking my blueprints, and it’s mostly good expect I get a few that report:
Error Failed import for Function
I don’t see any negative consequences for this, and when I open each blueprint it can compile without issue. Should I worry about this? Does anyone know what can cause this error?
For me, this was caused by defining a Function in blueprints, say “DoSomething” and have that blueprint exist in a world. Then later adding a C++ function of the same name to that blueprint’s parent C++ class. After I did this, I would remove the blueprint functions thinking everything was fine. But when I loaded the world later, it would throw this error. It appears the blueprint has a hidden version of old DoSomething which is now preventing the C++ DoSomething from importing.
Now there is probably a nice config file redirector solution to this, but I wasn’t sure how to do that with no documentation on it. You’ll notice that there is no instance name for the problem object. My error showed the direct class derived from my C++ base class, but I have many things derived from that. So the error message didn’t help me in isolating the issue other than the function name.
So how do you find and fix this? It’s not pretty. I went into my blueprints and temporarily deleted all the calls to the c++ function even if they look legitimate. Shutdown and save the maps with the error. I then renamed the c++ function to DoSomething2. I re-opened the editor and opened the worlds and you’ll notice the error is gone. Save the worlds and shutdown again. Rename the C++ class back to DoSomething. Re-open the editor and re-add your calls to the c++ function to your blueprints.
I hope this helps you. Also, I have learned to not trust Hot Reload. It may have helped with this issue, but it once left me in a situation where I couldn’t save and close the editor because of link to an external package. I wish there was a way to disable hot reload!
I had this error as well. I needed to pass an animation notify from the animation BP to the character BP so I decided to use an event dispatcher. When I loaded the project, I got that error saying it failed to import the dispatcher function.
It said something about a ‘signature’. If you click on the event dispatcher in the asset browser, the details panel will show something called “Copy signature for”. In that drop-down was a bunch of notifies, so I figured I’d try ‘copying’ the notify that matched up with each dispatcher (since they are a pass-thru for the notifies anyway). It seemed like selecting the drop-down items didn’t do anything but when I closed and re-opened the project, I didn’t get the error message. I also packaged a zip, unzipped it, and rebuilt that and I didn’t get the error there either.
In the docs, the 'Copy signature for" feature is described as just a matter of convenience. Not sure why what I did would help. Maybe it isn’t created with a signature at all so you have to do something to get it created. It could also just be a coincidence, but if anyone else has the problem, it’s worth verifying/refuting my solution.