NodeCanvas Forums › Support › Array Member in Custom Actions Issue
Hi, we are having some issues with array type members of custom actions, NC tries to handle it as IList which is not right. Class definition:
We are using v1.5.2 and the error is:
IndexOutOfRangeException: Array index is out of range. NodeCanvas.Variables.BBVariable.SetBBFields (NodeCanvas.Blackboard bb, System.Object o) (at Assets/NodeCanvas/Core/Blackboard/BBVariables.cs:46) NodeCanvas.Task.UpdateBBFields (NodeCanvas.Blackboard bb) (at Assets/NodeCanvas/Core/Tasks/Task.cs:317) NodeCanvas.Task.SetOwnerSystem (ITaskSystem newOwnerSystem) (at Assets/NodeCanvas/Core/Tasks/Task.cs:69) NodeCanvas.Graph.SendTaskOwnerDefaults () (at Assets/NodeCanvas/Core/Graph/Graph.cs:153) NodeCanvas.Graph.set_agent (UnityEngine.Component value) (at Assets/NodeCanvas/Core/Graph/Graph.cs:95) NodeCanvas.Graph.StartGraph (UnityEngine.Component agent, NodeCanvas.Blackboard blackboard, System.Action callback) (at Assets/NodeCanvas/Core/Graph/Graph.cs:259) NodeCanvas.Graph.StartGraph (UnityEngine.Component agent, NodeCanvas.Blackboard blackboard) (at Assets/NodeCanvas/Core/Graph/Graph.cs:231) NodeCanvas.GraphOwner.StartBehaviour () (at Assets/NodeCanvas/Core/Graph/GraphOwner.cs:77) NodeCanvas.GraphOwner.OnEnable () (at Assets/NodeCanvas/Core/Graph/GraphOwner.cs:195)
We bypass this error adding a validation in BBVariables.cs changing this:
into this:
I’m not really familiar with FieldInfo class, so i’m not 100% sure if this is the right solution, for now it fixed our issues.
Hey,
Thanks for bug report. Will fix that for next verion. Cheers!
Join us on Discord: https://discord.gg/97q2Rjh
Username
Password
Remember Me
By registering on this website you agree to our Privacy Policy.
Email
Confirm Password
Username or Email