Hi, is there any way to safely rename an already made node without making them missing reference in the flow? Currently, I decided to rename one of my node and it broke many of my flows because those flows use the renamed node. It would be time consuming to fix them again one-by-one so a way to not make it lose reference would be nice.
While renaming the type name of type used in the graph via reflection node, please note that FlowCanvas does have a refactoring tool (Graph Refactor accessible in the graph editor toolbar), which let you batch refactor missing reflection nodes quite easily. Have you tried this tool and if so does it not work for you?
Another way is to use the [DeserializeFrom] attribute above your changed name type and provide the attribute argument with the full name of the previous type (that means including namespace).
Hi, maybe missing references is a wrong word to use in this case. The right term maybe is the renamed namespace node was changed into a wrong node so the refactoring tool won’t do much in this case. I attached an example image of the case. The wrong node used to be Set Effector Data but was changed into Is State Name Data when I renamed the namespace.
Hmm. I cant see how the node changed to point to “Is State Name Data” considering that it has a completely different name than “Set Effector Data”. Did this change simply happened on its own after you changed the class namespace, or did you previously used the Refactor Tool?
Right now since the node does not point to anything missing, indeed the Refactoring tool cant do much since nothing is missing. A possible solution to change existing nodes to point to a different “reference” is to export the graph in JSON (from the Graph Editor toolbar), manually change the json and finally import that JSON back into the graph (from the toolbar).
I am still however very puzzled by how the node reference method changed to some other method with a completely different name in the first place. This is something that definitely should not happen automatically.
Import the package to a new Unity project. There’s a simple scene. Go to main camera, there will be a bound flowscript controller attached. Inside, you can find 2 nodes. Try renaming the namespace for my custom node, save it, and you can see that the node will be changed to my other node. Tested it a couple of times and it always happened to me.
I’ve checked your project. The problem here is that you have dozens of classes named exactly the same “SetData”, so when you change the namespace of one of those, since the namespace can no longer be found, the systems fallbacks to another class named “SetData” and since it finds one, the node changes to that newly found node whos class name also is “SetData”. I’d highly recommend against using so mane classes named exactly the same and only differentiated by their namespace (which seems like you are using instead of class naming since each each ‘SetData’ class is in a separate namespace called StartLadderClimbDataNode, IsLadderAbovePlayerDataNode etc).