x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

[4.10.0] BP: Function not resolved after copy/paste

When copying a calling node from Blueprint A to Blueprint B, it stops working although there is a function with same name and same signature. Refreshing nodes doesn't change anything.

The error message doesn't make much sense:

alt text

There is no refactoring functionality, so there is no alternative in recreating functions, variables etc. in the target class by hand and then trying to copy everything over.

spyro

Product Version: UE 4.10
Tags:
more ▼

asked Dec 02 '15 at 12:08 PM in Bug Reports

avatar image

spyro
1.7k 105 117 229

avatar image Ben Halliday STAFF Dec 02 '15 at 04:24 PM

Hi spyro,

I wouldn't expect this to work. The calling node is referencing a specific function, not the name of the function. That error message is misleading, so I'll enter a bug report for that. Other than that, most copying from one blueprint to another can be done, including variables. I could see copying functions from one BP to another being a super useful feature, so I'll create a feature request for that... but I have no idea how complex that would be. Is there anything else I'm missing, or would the error message bug report and the function copy feature request cover everything?

avatar image spyro Dec 02 '15 at 08:08 PM

Hi Ben, yes I think that covers everything, thank you. Moving methods/events from one class to another has been very error prone in Blueprint ever since.

avatar image Ben Halliday STAFF Dec 02 '15 at 08:49 PM

Cool, I'll enter those shortly and post an answer here once I have.

One thing I'd like to point out, if you're not already aware, is the Create Variable feature when copying variable nodes:

alt text

This way if you copy a block of nodes and it includes a reference to a variable into a new Blueprint, you won't have to manually create the variable. This doesn't port over default values, though, but it might help save some time.

Hope that helps a bit, if you didn't already know about it.

createvariable.png (20.4 kB)
avatar image spyro Dec 02 '15 at 09:44 PM

This will really become handy from time to time, thank you.

avatar image Ben Halliday STAFF Dec 02 '15 at 10:06 PM

Hey, so I attempted this in 4.10, and it actually worked. To test, I created two new Actor Blueprints. In ABP1, I created a new function with a bool input. I then called the function in the event graph. I created a new function in ABP2 with the same name and also gave it a bool input. I then copied the function call node from ABP1 and pasted it into the Event Graph in ABP2. It pasted and compiled without any problems. Am I missing any steps?

avatar image spyro Dec 03 '15 at 06:15 AM

This is pretty much exactly what I did. I then just dragged the new function into the graph and reconnected the wires. Strange...

avatar image Ben Halliday STAFF Dec 03 '15 at 04:02 PM

Hm. Happen in a new project as well?

avatar image spyro Dec 04 '15 at 09:05 AM

No, doesn't happen in a new test project for some reason.

The only issue is, that a function call node is silently removed without any warning message if a method doesn't exist in the new blueprint instead of creating a placeholder or asking to copy the function as well.

avatar image Ben Halliday STAFF Dec 04 '15 at 04:48 PM

So wait, after this compiler issue, function call nodes that already existed in the new blueprint for that function don't work anymore either? Or am I misunderstanding you? I thought it was a simple matter of the copied node not compiling (which I haven't reproduced yet).

The project you see this in was upconverted, yea? How far back in engine versions does it go? Maybe I can reproduce it if I try upconverting projects to 4.10. Did the function in the original blueprint exist in an earlier version, or was that one also created in 4.10?

avatar image spyro Dec 08 '15 at 05:42 PM

Hi Ben,

Yes, the project was converted from 4.9.2 (used a copy). We are talking about two different types of issues:

  • Inside my project (4.10.0) I was able to copy a function call node in a new blueprint as long as there is a function with the same signature in the target blueprint, but I couldn't compile it. This seems to work in a newly created project.

  • When there is no function with the same signature in target blueprint, the calling node just gets silently removed while pasting

avatar image spyro Dec 09 '15 at 03:00 PM

Hi again,

got the same problem today after copying a bunch of events from the level blueprint in the referenced target blueprint itself:

alt text

All getter and setter nodes where destroyed, too (the 'target' to set or get a variable is now the class itself, but it's not possible to re-use the nodes, they have to be re-created by hand now). While doing this, the editor crashed: http://pastebin.com/a55CNt98 (crash report)

Was trying to copy and paste the text of a comment bubble.

avatar image Ben Halliday STAFF Dec 09 '15 at 09:12 PM

Heya spyro,

I'm still looking into this, but haven't had any luck yet. I'm going to try different BP types than the standard Actor. Have you noticed a pattern with specific types of blueprints, or is this universal? Also, the function being copied, was that created in the 4.9.2 version originally?

The crash you got appears to involve comments specifically. I looked it up and apparently something new in 4.10 is causing this crash for multiple people. We're going to try to get a reproduction based on the reports that have come in for it, but I may have more questions about that. It does not appear to be related to the issue you're describing in the OP, so I'm skipping that for the moment.

avatar image Ben Halliday STAFF Dec 09 '15 at 09:19 PM

We got a repro and a bug report in for that comment crash now (UE-24291). Thanks for bringing it to my attention!

avatar image Ben Halliday STAFF Dec 09 '15 at 09:37 PM

Okay, yea, upping a project from 4.9.2 to 4.10.1 didn't reproduce the issue for me either. I tried copying from Actor, Character, PlayerController, GameMode, GameInstance, and Level BP, all referenced somewhere else (project settings, game mode, etc), into an Actor BP both from 4.9 and a new one from 4.10, and still nothing. I must be missing a step somewhere.

avatar image spyro Dec 10 '15 at 02:19 PM

Hi Ben,

  • the original function was created in 4.9.2 (as far as I can remember)

  • it was copied from the level blueprint to an actor blueprint. This actor was referenced before from the target blueprint, now the functionality was moved directly into this actor.

avatar image spyro Dec 10 '15 at 02:34 PM

I can reproduce the broken-function-call-bug in 4.10.1 as follows (might be a strange example but it works)

  • Create a new actor blueprint called BP_Test

  • Add a class variable of type string called 'testString', set 'test' as a default value

  • Add a method 'printSomething' which looks like this:

alt text

  • Open the level blueprint

  • Create a graph like this

alt text

Test the script (should simply write the word 'test' to the console).

alt text

Now let's try to move this functionality from the level blueprint into the referenced blueprint itself.

  • Copy the nodes from the level blueprint and paste it into the event graph of BP_Test and press compile:

alt text

Try to remove the broken reference nodes (unknown) and try to refresh all nodes + recompile:

alt text

Remove the broken variable node and replace it with a fresh getter node:

alt text

Even then, the function call stays broken and has to be manually replaced.

(The other issue is that pasting a function call node into a blueprint which hasn't that function results in the Blueprint editor silently removing the node without any message and breaking the execution flow)

avatar image Ben Halliday STAFF Dec 10 '15 at 05:47 PM

Does this only happen when copying from a BP with a specific actor reference? So you reference BP2 in BP1 and get a function call from a function in BP2, then copy the function call and paste into BP2?

The issue with functions not being copied over when there isn't an existing function is a known thing, and may be intentional. I know it was reported at some point, but I don't remember specifically what the outcome was. I'll do some research and enter a new bug if necessary.

avatar image spyro Dec 11 '15 at 05:27 PM

Hi Ben,

well, I'm afraid that's my bug report. Code gets broken after copy & paste and there is currently no alternative to do so because there is no other method to move code to other classes. It's not only that calling nodes are silently removed but the execution flow gets broken also. And sometimes it doesn't even work if there is a method with the same signature. I posted all necessary steps to reproduce this.

If you say this is intentional, well, I honestly don't know what to say. No offense.

Thanks for investigating, though.

avatar image Ben Halliday STAFF Dec 11 '15 at 05:47 PM

No no, I don't think that's intentional at all. I can reproduce the behavior in that circumstance, and just want to verify that's the only circumstance it occurs for you before I enter a report.

It actually sounded very familiar, so I found an old post you and I were working on that ended in a bug report:

https://answers.unrealengine.com/questions/213538/475-function-binding-lost-after-copypaste.html

Not quite the same thing, but the bug report is exceptionally similar. There's also another that's more specifically related to what I described (UE-23696). I'll probably add some info to that one once you confirm. So is that a yes? This only happens with that specific chain?

avatar image spyro Dec 11 '15 at 07:18 PM

Hi Ben,

yes, I may have forgotten that I stumbled over that already 8 months before, didn't remember that, sorry.

So it may be limited to code thats being transfered from the level blueprint to actor blueprints (in case of broken function calling nodes).

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Okay, cool, this appears to affect function calls that are pulled from specific BP function references. So when I reference BP1 in BP2 and do a function call from that reference, copying that function call (with or without the reference) will copy it with the reference and the BP with the copy will not compile. This is very similar to the post we originally entered (UE-13983), but almost exactly matches a newer report. I've updated UE-23696 with some of the information from this post, and I'll post here when I see any updates on it.

The second issue you've reported (function call nodes not being copied over at all if there isn't an existing function) is going to require it's own bug report. I'll enter that separately and post here once I have.

more ▼

answered Dec 12 '15 at 07:22 PM

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question