Reply To: [BUG] Copy BT or FSM Component keeps reference to old BB

Forums 💬 NodeCanvas ⚙️ Support [BUG] Copy BT or FSM Component keeps reference to old BB Reply To: [BUG] Copy BT or FSM Component keeps reference to old BB

#16679
Gavalakis
Keymaster

    Hello Frank,

    Indeed, this can certainly qualify as a bug. The problem however is that Unity does not really provide a proper callback for when a component has been copy/pasted like this. There does exist the “Reset” callback, but that is called before Unity overwrites the component data (serialization) by copy paste from previous one. Thus the order is:

    • Component is pasted as new.
    • Reset is called. I could do something here, but,
    • Then Unity actually does the copy/paste and overwrites any changes anyway.
    • Then there is no other callback after that. :-/

    I think that the best way to avoid some confusion, would be to expose the Blackboard field in the GraphOwner inspector (which is currently only possible to see if one enters the “Debug Inspector Mode”).

    What do you think?

    Thank you!