Abstract class reference in Action Task

NodeCanvas Forums Support Abstract class reference in Action Task

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #9893
    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

    #9897
    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

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

    #9896
    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!

    #9895
    TSEGordon
    Participant

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

    #9894
    Gavalakis
    Keymaster

    Dont worry about it 🙂
    Cheers!

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

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