Why static events in DialogueTree

Forums 💬 NodeCanvas 🗨️ General Discussion Why static events in DialogueTree

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #13658
    patrick
    Participant

      Hello,

      I’m on it to prototype a bit with NodeCanvas.
      I’m a bit confused because I need to register callbacks to static events like:

      DialogueTree.OnSubtitlesRequest += HandleSubtitleRequest;

      I investigated the StatementNode and Say Action. Why don’t you use there the parameter or class member ‘agent’ (which is the reference to the DialogTree instance)?

      Did you do this, because you clone the DialogTree instance in the GetInstance() method?

      Cheers
      Patrick

      #13659
      Gavalakis
      Keymaster

        Hello,

        Static events are used because there can only be one Dialogue Tree playing at a time, thus static events made sense in this case for that reason.
        It’s really irrelevant of the fact that a instance is created. 🙂

        Thanks!

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