Easily convert blackboard variable to a different type?

Forums 💬 FlowCanvas ⚙️ Support Easily convert blackboard variable to a different type?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #12481
    elvisish
    Participant

      I have a Player gameobject blackboard variable on my global blackboard that I’d like to convert into a transform variable without deleting it, making a new variable, calling it Player and reconnecting all of the connections, rather just have the variable type swapped directly from gameobject to transform. Is this possible?

      #12485
      Gavalakis
      Keymaster

        Hey,

        This is currently not possible, but it is already on the roadmap since that has been requested once or twice already in the past. 🙂

        #12484
        elvisish
        Participant

          Love the new change type feature! Just wanted to mention that FC doesn’t change variable references in the graphs, they have to be manually removed and re-added if they’re changed:

          [video src="https://i.imgur.com/7wy7HXL.mp4" /]

          #12483
          Gavalakis
          Keymaster

            Hey,

            GameObject and Transform are not really interchangeable other than the fact that both types derive the UnityEngine.GameObject type, and as such a reference can not be kept, unless I make it a special case where I check the types being changes (old and new) and depending on that do a GetComponent on the old reference to fetch the new reference (in this case Transform).

            I would prefer to avoid this special case to be honest. Do you really find it that much required?

            Cheers! 🙂

            #12482
            elvisish
            Participant

              I was imagining that it would be tracking the type, in the same way as if I deleted the bbvar and the reference would go red to denote it wasn’t connected. If the types that are changed are unrelated and connected in a way that didn’t make any sense, I assumed the connection would show an exclaim (!) on the port, as it does if I change the overload method on a node that already has connections. Is it difficult for the graph to be able to just switch the type on the reference to the bbvar if it’s changed?

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