Page 1 of 1

Can't Find Where Message Is Consumed

Posted: Fri Jun 09, 2023 4:03 am
by junwi21
So, I have a quest where I'm sending a particular message on quest completion. However, it's been a while since I opened this project, so I do not remember where I'm listening for this message. I've been searching around my scene but I don't know where the event listener is or if I'm even using an event listener component and listening for it somewhere else instead.

Any tips on how to find this?

Re: Can't Find Where Message Is Consumed

Posted: Fri Jun 09, 2023 7:46 am
by Tony Li
Hi,

Temporarily tick the Quest Machine GameObject's Debug Settings > Debug Message System. This will log all Message System activity to the Console window, so it will be a lot of info. Look for a message containing "MessageSystem.AddListener", such as:

MessageSystem.AddListener(listener=PixelCrushers.QuestMachine.QuestCounter: Get,Carrot)

The example above appears in the Demo when you accept the Harvest Carrots quest.

Re: Can't Find Where Message Is Consumed

Posted: Fri Jun 09, 2023 8:07 am
by junwi21
Hello,

Ahhh thank you! I put the listener on a debug game object while I was testing things. :lol: I wouldn't have thought to look there.

Re: Can't Find Where Message Is Consumed

Posted: Fri Jun 09, 2023 8:10 am
by Tony Li
Glad to help!