How do I use GetValue!

Forums 💬 NodeCanvas ⚙️ Support How do I use GetValue!

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #18021
    yulaw2k
    Participant

      List<GameObject> list = (List<GameObject>) blackboard.GetValue<List>(“Target List”);

      How do I do this? I have tried many different versions of this…….Been trying for an hour. Can someone please post an example.
      Is there a way to expose the variables like any other script, like GetComponent(BlackBoard).VariableName ?

      #18022
      Gavalakis
      Keymaster

        Hey,

        The generic argument of GetValue method, is the type of the variable you want to get. You don’t need to cast the returned value.
        This is how it’s used:

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