Abstract class reference in Action Task

Forums 💬 NodeCanvas ⚙️ Support Abstract class reference in Action Task

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #19361
    tsegordon
    Participant

      Hi there,

      I derive a few of my game classes from abstract classes, e.g I have a base GameUI class, with CharacterUI and ObjectUI deriving from that. If I try and expose an abstract reference in an Action it just shows as ‘(Abstract)’ and I cannot assign anything to it. Am I missing a trick somewhere?

      AbstractClass.cs

      ActionAbstract.cs

      #19365
      Gavalakis
      Keymaster

        Hello,

        If the abstract class is deriving from Unity Object, like in your example, then the field will show the normal control for assignments.
        The ‘(Abstract)’ label is only shown when the class derives System.Object, since you can’t do any editor assignements with that type.

        So, it’s a bit weird the fact that it doesn’t work for you this way. I just checked again and it does work as intended.
        What version of NodeCanvas are you using?

        Thanks

        #19364
        tsegordon
        Participant

          I think we’re a couple of versions behind, but not too far. I’ll grab the latest on Monday and let you know what I find.

          Thanks for getting back to me so quickly!

          #19363
          tsegordon
          Participant

            Grabbed the latest version and everything is working fine, so sorry for not trying that first. Thanks for the help!

            #19362
            Gavalakis
            Keymaster

              Dont worry about it 🙂
              Cheers!

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