Create an enum in blackboard

NodeCanvas Forums Support Create an enum in blackboard

Tagged: ,

This topic contains 5 replies, has 3 voices, and was last updated by  Gavalakis 2 months, 1 week ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #12612

    pvanallen
    Participant

    I can’t seem to find any info on how to create an enum to use in the blackboard and conditions. How do you do that?

    #12623

    Gavalakis
    Keymaster

    Hello,

    You first have to actually create an enum type within some script of yours, like for example:

    
    public enum MyEnum
    {
    	One,
    	Two,
    	Three,
    	Four
    }
    

    Then, you have to add that new enum type in the Preferred Types Editor window (Tools/ParadoxNotion/NodeCanvas/Preferred Types Editor).

    After you have done this, your enum will show up in the menu and possible to be added as a variable 🙂
    EnumVariable

    Let me know if that works for you.
    Thanks.

    Attachments:
    You must be logged in to view attached files.
    #12625

    pvanallen
    Participant

    Yes, that worked. Thanks!

    Maybe put some reference to this on this page:

    nodecanvas.paradoxnotion.com/documentation/?section=the-blackboard

    I made a suggested edit on that page.

    .phil

    #12629

    Gavalakis
    Keymaster

    Thanks for letting me as well as for your documentation suggestion.
    I will see to it and update the docs 🙂

    Thanks!

    #13359

    meatloaf
    Participant

    It would also be great to be able to easily set a dynamicVar to an enum value in SetEnum.

    #13368

    Gavalakis
    Keymaster

    Hey,

    Do you mean for “ValueA”? If so it’s not possible now because “ValueA” assignment needs to be made so that the enum type is determined.
    To work around this, I could add a “Select Type” button to set the type though, instead of the pre-requirement of “ValueA” to be set for that.

    Let me know if that is indeed what you meant.
    Thanks 🙂

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.