NodeCanvas Forums › Support › 2.6.2 compatibility with 5.5.0f3
I just downloaded and imported NodeCanvas 2.6.2 from the asset store into a 5.5.0f3 project and I get tons of compile errors, mostly because of NavMesh/NavMeshAgent APIs.
I then imported it into a blank project and after the import, the Unity API updater popped up and asked me to upgrade scripts because of outdated API usage. That worked, the NC barebones project is compiling properly.
Copying the upgraded scripts to the actual target project left me without compilation errors.
Don’t know if this is intended, if it is, I don’t know why the API updater wouldn’t show up in the first project.
(Side note: How do I find out which NC version I currently have installed? I first thought that maybe the asset package was not downloaded properly and I accidentially had imported an older version)
Hello,
Actually this is intentional so that the package can be used in older Unity versions too, but you can run the Unity API updater manually at any time, through Unity’s top menu (Assets/Run API Updater…).
I think though that in the next version, I will just go and put #if UNITY_5_x directives for those parts of the code for clarity.
Regarding current version number, it’s only shown in the NodeCanvas editor, but that of course needs it to be successfully compiled first 🙂
I will add the version number in the ReadMe file included from now on.
Thanks!
Join us on Discord: https://discord.gg/97q2Rjh
I had a similar issue, but there were a lot of compilation errors related to missing methods within “EditorUtils”. I had to make the following changes manually to get rid of the compilation errors.
2.6.2 compatibility with 5.5.0f3 as well, installing fresh on an existing project.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
diff --git a/Assets/ParadoxNotion/NodeCanvas/Framework/Design/Editor/Inspectors/BlackboardInspector.cs b/Assets/ParadoxNotion/NodeCanvas/Framework/Design/Editor/Inspectors/BlackboardInspector.cs index 7d1fbd55..04bcba5e 100644 --- a/Assets/ParadoxNotion/NodeCanvas/Framework/Design/Editor/Inspectors/BlackboardInspector.cs +++ b/Assets/ParadoxNotion/NodeCanvas/Framework/Design/Editor/Inspectors/BlackboardInspector.cs @@ -18,7 +18,7 @@ namespace NodeCanvas.Editor{ public override void OnInspectorGUI(){ BlackboardEditor.ShowVariables(bb, bb); - EditorUtils.EndOfInspector(); + ParadoxNotion.Design.EditorUtils.EndOfInspector();^M if (Application.isPlaying || Event.current.isMouse){ Repaint(); } diff --git a/Assets/ParadoxNotion/NodeCanvas/Framework/Design/Editor/Inspectors/GlobalBlackboardInspector.cs b/Assets/ParadoxNotion/NodeCanvas/Framework/Design/Editor/Inspectors/GlobalBlackboardInspector.cs index 4b7a06c9..00936343 100644 --- a/Assets/ParadoxNotion/NodeCanvas/Framework/Design/Editor/Inspectors/GlobalBlackboardInspector.cs +++ b/Assets/ParadoxNotion/NodeCanvas/Framework/Design/Editor/Inspectors/GlobalBlackboardInspector.cs @@ -27,7 +27,7 @@ namespace NodeCanvas.Editor{ bb.dontDestroy = EditorGUILayout.Toggle("DontDestroyOnLoad", bb.dontDestroy); BlackboardEditor.ShowVariables(bb, bb); - EditorUtils.EndOfInspector(); + ParadoxNotion.Design.EditorUtils.EndOfInspector();^M if (Application.isPlaying) Repaint(); } diff --git a/Assets/ParadoxNotion/NodeCanvas/Framework/Design/Editor/Inspectors/GraphInspector.cs b/Assets/ParadoxNotion/NodeCanvas/Framework/Design/Editor/Inspectors/GraphInspector.cs index cc09c3b6..bd898e63 100644 --- a/Assets/ParadoxNotion/NodeCanvas/Framework/Design/Editor/Inspectors/GraphInspector.cs +++ b/Assets/ParadoxNotion/NodeCanvas/Framework/Design/Editor/Inspectors/GraphInspector.cs @@ -41,7 +41,7 @@ namespace NodeCanvas.Editor{ GUILayout.Space(10); graph.name = EditorGUILayout.TextField("Name", graph.name); graph.graphComments = GUILayout.TextArea(graph.graphComments, GUILayout.Height(45)); - EditorUtils.TextFieldComment(graph.graphComments); + ParadoxNotion.Design.EditorUtils.TextFieldComment(graph.graphComments);^M GUI.backgroundColor = new Color(0.8f,0.8f,1); if (GUILayout.Button(string.Format("EDIT {0}", graph.GetType().Name.SplitCamelCase().ToUpper() ))){ @@ -103,7 +103,7 @@ namespace NodeCanvas.Editor{ occurencies[bbVar.name] ++; } - EditorUtils.TitledSeparator("Defined Blackboard Parameters"); + ParadoxNotion.Design.EditorUtils.TitledSeparator("Defined Blackboard Parameters");^M if (varInfo.Count == 0){ EditorGUILayout.HelpBox("The graph has no defined Blackboard Parameters", MessageType.None); @@ -140,7 +140,7 @@ namespace NodeCanvas.Editor{ GUILayout.EndHorizontal(); if (duplicateTypes.Count > 0){ - EditorUtils.Separator(); + ParadoxNotion.Design.EditorUtils.Separator();^M GUILayout.Label("Duplicate Types"); foreach (var pair in duplicateTypes){ EditorGUILayout.LabelField(pair.Value, pair.Key.FriendlyName()); diff --git a/Assets/ParadoxNotion/NodeCanvas/Framework/Design/Editor/Inspectors/GraphOwnerInspector.cs b/Assets/ParadoxNotion/NodeCanvas/Framework/Design/Editor/Inspectors/GraphOwnerInspector.cs index 00bfcea3..8c141cd1 100644 --- a/Assets/ParadoxNotion/NodeCanvas/Framework/Design/Editor/Inspectors/GraphOwnerInspector.cs +++ b/Assets/ParadoxNotion/NodeCanvas/Framework/Design/Editor/Inspectors/GraphOwnerInspector.cs @@ -44,7 +44,7 @@ namespace NodeCanvas.Editor{ //create new graph asset and assign it to owner Graph NewAsAsset(){ - var newGraph = (Graph)EditorUtils.CreateAsset(owner.graphType, true); + var newGraph = (Graph)ParadoxNotion.Design.EditorUtils.CreateAsset(owner.graphType, true);^M if (newGraph != null){ Undo.RecordObject(owner, "New Asset Graph"); owner.graph = newGraph; @@ -127,11 +127,11 @@ namespace NodeCanvas.Editor{ //Graph comments ONLY if Bound graph if (owner.graphIsBound){ owner.graph.graphComments = GUILayout.TextArea(owner.graph.graphComments, GUILayout.Height(45)); - EditorUtils.TextFieldComment(owner.graph.graphComments, "Graph comments..."); + ParadoxNotion.Design.EditorUtils.TextFieldComment(owner.graph.graphComments, "Graph comments...");^M } //Open behaviour - GUI.backgroundColor = EditorUtils.lightBlue; + GUI.backgroundColor = ParadoxNotion.Design.EditorUtils.lightBlue;^M if (GUILayout.Button( ("Edit " + owner.graphType.Name.SplitCamelCase()).ToUpper() )){ GraphEditor.OpenWindow(owner); } @@ -172,7 +172,7 @@ namespace NodeCanvas.Editor{ owner.disableAction = (GraphOwner.DisableAction)EditorGUILayout.EnumPopup("On Disable", owner.disableAction); - EditorUtils.Separator(); + ParadoxNotion.Design.EditorUtils.Separator();^M //derived GUI OnExtraOptions(); @@ -185,12 +185,12 @@ namespace NodeCanvas.Editor{ GUILayout.BeginHorizontal("box"); GUILayout.FlexibleSpace(); - if (GUILayout.Button(EditorUtils.playIcon, owner.isRunning || owner.isPaused? pressed : (GUIStyle)"button")){ + if (GUILayout.Button(ParadoxNotion.Design.EditorUtils.playIcon, owner.isRunning || owner.isPaused? pressed : (GUIStyle)"button")){^M if (owner.isRunning || owner.isPaused) owner.StopBehaviour(); else owner.StartBehaviour(); } - if (GUILayout.Button(EditorUtils.pauseIcon, owner.isPaused? pressed : (GUIStyle)"button")){ + if (GUILayout.Button(ParadoxNotion.Design.EditorUtils.pauseIcon, owner.isPaused? pressed : (GUIStyle)"button")){ ^M if (owner.isPaused) owner.StartBehaviour(); else owner.PauseBehaviour(); } @@ -200,8 +200,8 @@ namespace NodeCanvas.Editor{ GUILayout.EndHorizontal(); } - EditorUtils.ShowAutoEditorGUI(owner); - EditorUtils.EndOfInspector(); + ParadoxNotion.Design.EditorUtils.ShowAutoEditorGUI(owner);^M + ParadoxNotion.Design.EditorUtils.EndOfInspector();^M UndoManager.CheckDirty(owner); if (owner.graph != null && owner.graphIsBound){ diff --git a/Assets/ParadoxNotion/NodeCanvas/Framework/Design/Editor/Windows/ExternalInspectorWindow.cs b/Assets/ParadoxNotion/NodeCanvas/Framework/Design/Editor/Windows/ExternalInspectorWindow.cs index 4ffe67fc..0606e4d1 100644 --- a/Assets/ParadoxNotion/NodeCanvas/Framework/Design/Editor/Windows/ExternalInspectorWindow.cs +++ b/Assets/ParadoxNotion/NodeCanvas/Framework/Design/Editor/Windows/ExternalInspectorWindow.cs @@ -68,7 +68,7 @@ namespace NodeCanvas.Editor{ (currentSelection as Connection).ShowConnectionInspectorGUI(); } - EditorUtils.EndOfInspector(); + ParadoxNotion.Design.EditorUtils.EndOfInspector();^M GUILayout.EndScrollView(); } @@ -80,7 +80,7 @@ namespace NodeCanvas.Editor{ GUILayout.Label("<b><size=16>" + text + "</size></b>"); GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); - EditorUtils.BoldSeparator(); + ParadoxNotion.Design.EditorUtils.BoldSeparator();^M } } } diff --git a/Assets/ParadoxNotion/NodeCanvas/Modules/ActionListPlayer/Editor/ActionListPlayerInspector.cs b/Assets/ParadoxNotion/NodeCanvas/Modules/ActionListPlayer/Editor/ActionListPlayerInspector.cs index 1dbe3ef9..1cc94427 100644 --- a/Assets/ParadoxNotion/NodeCanvas/Modules/ActionListPlayer/Editor/ActionListPlayerInspector.cs +++ b/Assets/ParadoxNotion/NodeCanvas/Modules/ActionListPlayer/Editor/ActionListPlayerInspector.cs @@ -21,7 +21,7 @@ namespace NodeCanvas.Editor{ list.blackboard = (Blackboard)EditorGUILayout.ObjectField("Target Blackboard", (Blackboard)list.blackboard, typeof(Blackboard), true); Task.ShowTaskInspectorGUI(list.actionList, null, false); - EditorUtils.EndOfInspector(); + ParadoxNotion.Design.EditorUtils.EndOfInspector(); if (Event.current.isMouse){ Repaint(); diff --git a/Assets/ParadoxNotion/NodeCanvas/Modules/BehaviourTrees/Editor/BehaviourTreeOwnerInspector.cs b/Assets/ParadoxNotion/NodeCanvas/Modules/BehaviourTrees/Editor/BehaviourTreeOwnerInspector.cs index c0d3a93d..86554f7b 100644 --- a/Assets/ParadoxNotion/NodeCanvas/Modules/BehaviourTrees/Editor/BehaviourTreeOwnerInspector.cs +++ b/Assets/ParadoxNotion/NodeCanvas/Modules/BehaviourTrees/Editor/BehaviourTreeOwnerInspector.cs @@ -26,7 +26,7 @@ namespace NodeCanvas.Editor{ } protected override void OnGrapOwnerControls(){ - if (GUILayout.Button(EditorUtils.stepIcon)){ + if (GUILayout.Button(ParadoxNotion.Design.EditorUtils.stepIcon)){^M owner.Tick(); } } diff --git a/Assets/ParadoxNotion/NodeCanvas/Modules/DialogueTrees/Editor/DialogueTreeInspector.cs b/Assets/ParadoxNotion/NodeCanvas/Modules/DialogueTrees/Editor/DialogueTreeInspector.cs index 50067805..3f26d49c 100644 --- a/Assets/ParadoxNotion/NodeCanvas/Modules/DialogueTrees/Editor/DialogueTreeInspector.cs +++ b/Assets/ParadoxNotion/NodeCanvas/Modules/DialogueTrees/Editor/DialogueTreeInspector.cs @@ -22,7 +22,7 @@ namespace NodeCanvas.Editor{ ShowActorParameters(dialogue); - EditorUtils.EndOfInspector(); + ParadoxNotion.Design.EditorUtils.EndOfInspector();^M if (GUI.changed){ EditorUtility.SetDirty(dialogue); @@ -31,7 +31,7 @@ namespace NodeCanvas.Editor{ //static because it's also used from DialogueTreeController public static void ShowActorParameters(DialogueTree dialogue){ - EditorUtils.TitledSeparator("Dialogue Actor Parameters"); + ParadoxNotion.Design.EditorUtils.TitledSeparator("Dialogue Actor Parameters");^M EditorGUILayout.HelpBox("Enter the Key-Value pair for Dialogue Actors involved in the Dialogue.\nReferencing a DialogueActor is optional.", MessageType.Info); GUILayout.BeginVertical("box"); |
Hey Jacob. Sorry but I missed your reply here.
That looks like a conflict with another class that probably exists in your project named “EditorUtils”, but which seems to not be part of a namespace, but rather part of the “global” namespace.
Join us on Discord: https://discord.gg/97q2Rjh
yep, that looks right actually. thanks for the follow up.
I’d also add a strong vote for using UNITY_5_x directives throughout instead of relying on the API updater. first, it gave me a bad first impression of your library (“is this thing broken?!”) and second, if the project has any syntax errors (for example, a namespace conflict as I had…) the auto updater will not run until those errors are fixed. this forced me to dig into your code and “fix” them myself before it could run.
Hey,
I agree with you. The next version will not rely on the AutoUpdater any more, but rather using directives.
Thanks for your feedback.
Join us on Discord: https://discord.gg/97q2Rjh