NodeCanvas Forums › Support › The namespace `NodeCanvas’ already contains a definition for `ITaskAssignable’
Just imported the next version and I got a compiler error:
Assets/NodeCanvas/Scripts/Core/Graph/NodeBase.cs(23,26): error CS0101: The namespace NodeCanvas' already contains a definition for
ITaskAssignable’
Got any thoughts on this one?
Hello,
Please always remove previous instalation (NodeCanvas folder) and re-import anew.
This will fix it and ensure a sucessful upgrade 🙂
Cheers!
Join us on Discord: https://discord.gg/97q2Rjh
K I did that but now all of my behavior trees and fsms are filled with empty nodes. Is there a way I can smoothly transition to the upgraded version of this asset without losing all of my nodes that have actions/conditions that I wrote myself?
It seems that now all of my behavior trees need to be redone now. I am really hoping this isn’t the case 🙁
Even the prefabs I had saved have empty nodes in place of where my custom action/conditions were. 🙁 🙁 🙁
Hello,
That is very weird since updating was always smooth from any version and havent been yet reported such a behaviour.
Check 1: I suppose your custom tasks were not in the NodeCanvas folder that you deleted (stupid question I know)
Check 2: Did you reload your scene or reopen Unity after deleting old folder and importing the new package?
Check 3: Do your custom task scripts have the same name as the class they implement?
What was your last version from which you upgraded from so that I try exactly that upgrade as well.
Join us on Discord: https://discord.gg/97q2Rjh
The version I was upgrading from was from early June. I did delete the folder they were in, as they were in the nodecanvas folder, but I reimported them by dragging the scripts into unity. The names match up as well. I had working behavior trees and fsms and then after upgrade they were all empty nodes.
Even after getting all the fsms and behavior trees back to (I think) how I had them some of my actions/conditions that I wrote don’t work as they did before. Some of the scripts that had “protected override string actionInfo” now have errors- It seems to have been fixed by just removing the override. Is that the appropriate fix?
There were some refactoring in names. The readme inside the package had this information up until the very latest release.
I’ve made a post with that upgrade information:
http://nodecanvas.com/forums/topic/upgrading-from-to-1-5/
For example the actionInfo propery is renamed to info. Take a look a the post for for possible changes that you may need to do in your scripts 🙂
Join us on Discord: https://discord.gg/97q2Rjh
Thanks a lot I will take a look 🙂
Also I have a lot of yellow errors at startup that says “The referenced script on this Behaviour is missing!” I am sure that is related to the whole blank nodes problem- not sure if that gives you any insight into what happened.
Something very weird happened while you upgraded. Did you manage to load up your previously created graphs?
I’ll suggest you once again, with your custom tasks in project you have imported, reimport NodeCavnas and reopen unity.
If at all possibly send me a project to take a better look at what’s going on : info_at_nodecanvas.com
Thanks
Join us on Discord: https://discord.gg/97q2Rjh
No I didn’t get my old graphs loaded up (not exactly anyways). I just re did all of the nodes and conditions with the scripts that should have been there and got it to where they were (not exactly, I don’t think- still trying to figure it all out haha). Even with all of the nodes replaced I have errors like I mentioned that say “The referenced script on this Behaviour is missing!”- and this is with the trees when I already replaced all the nodes and conditions. So apparently it still thinks that these missing scripts are still in there. I think what I am going to do is make a brand new empty tree and just remake all of the behaviors and state machines from a blank slate.
So you suggest just to re-import or to delete the folder and THEN re-import?
As far as sending you a project that may be tough- mine is huge and needs to be cut down a LOT in order to be sent which probably wouldn’t be useful from a diagnostic/problem solving standpoint if we are removing parts of the project.
I also noticed there doesn’t seem to be a condition automatically on the connections now. Is that by design or is that a bug for me? I still see them there on the connections on my old trees, but it isn’t available on the new tree that I am making.
The conditions on the Behaviour Tree connections have been removed on purpose as to keep the design more organized around nodes, where the same thing can be achieved with a decorator. The old trees will still show the condition as to be backwards compatible and not break up already created trees.
If you certainly want to work with conditions on the connections I can tell you a very simply way of allowing them, but I really suggest that you to not and work around with decorators as to allow future update combatibility. The said decorators are Interruptor and Accessor for now. So it’s by desing 🙂
I realy can’t figure out what could possible went wrong with your trees 🙁
If you have a backup of the project, I would suggest you redo the process, of:
-Remove old NodeCanvas folder
-Import new version
-Re-open Unity
Thanks and sorry for the inconvenience
Join us on Discord: https://discord.gg/97q2Rjh
It’s no problem I just seem to always have trouble with updating assets haha. Almost always something goes wrong that I have to fix so it is probably just my bad luck 😛
I will use the decorators. Why exactly did you decide only to use the decorators instead of conditions on the connections? I loved the connection conditions personally 🙂
In case I do decide that I Want to use them what is the way to allow them?
Well, I too liked the conditions on the connection at some degree, but in the end I thought of removing them so that the design get more consistent working only with nodes (for BTs only of course), and so that the workflow is more streamlined.
It was a hard decision really 🙂
If you want to use them again, you should open up BTConnections.cs and instead of extending Connection, extend it from ConditionalConnection.
But be aware, that when you later on update, everything will be lost, so i highly dont recommend it. I will see if I can find an upgradable compatible option that though its still a bit behind the scenes.
Join us on Discord: https://discord.gg/97q2Rjh