Array Member in Custom Actions Issue

NodeCanvas Forums Support Array Member in Custom Actions Issue

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #10266
    mansonet
    Participant

    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.

    #10267
    Gavalakis
    Keymaster

    Hey,

    Thanks for bug report. Will fix that for next verion.
    Cheers!

    Join us on Discord: https://discord.gg/97q2Rjh

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.