Custom Properties on IStatement

NodeCanvas Forums Support Custom Properties on IStatement

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #15853
    blokymose
    Participant

    I’ve been playing around with the DialogueTree.
    I have a quick question, how do you add more properties to the IStatement, and display the new properties to the graph?
    Beside text, audio, and meta, I want to add an enum called Expression that can also be set when I’m creating a Say in the graph

    help please

    #15854
    blokymose
    Participant

    I’ve found the way.

    1. Add your new property in IStatement interface located in IStatement.cs; Don’t forget to implement that new property inside Statement class located in the same file.

    2. Add a new GUI for the drawer inside StatementDrawer.cs, then assign your property by the GUI. It’s hard to explain, but here’s my code:

    Attachments:
    You must be logged in to view attached files.
    #15860
    Gavalakis
    Keymaster

    Hello there,

    What you have done is the correct way to add a new property in dialogue statements if you don’t mind changing the source. 🙂

    Thanks!

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

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