Custom Properties on IStatement

Forums 💬 NodeCanvas ⚙️ Support Custom Properties on IStatement

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

      #15872
      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:

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

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