Sign In Register

How can we help you today?

Start a new topic
Answered

Debugging MatchFoundMessage

How can i debug MatchFoundMessage on the Test Harness? i authenticate and execute MatchmakingRequest. it will now stop on MatchFoundMessage.


Best Answer

Hi Ufuk,


You can use the following to get the get the matchID from the MatchFoundMessage.


var matchID = Spark.getData().matchId

 

So when a match is found the MatchFoundMessage Cloud Code will trigger the debugger. If you have any further questions just let me know.


Thanks,

Liam



1 person has this question

Also how can i get matchId in MatchFoundMessage cloud code?

Answer

Hi Ufuk,


You can use the following to get the get the matchID from the MatchFoundMessage.


var matchID = Spark.getData().matchId

 

So when a match is found the MatchFoundMessage Cloud Code will trigger the debugger. If you have any further questions just let me know.


Thanks,

Liam


I open test harness and authenticate my User A. I play my game on Unity, authenticate User B and send request for MatchMaking. I send MatchMaking request on test harness for User A. Unity gets MatchFoundMessage. Test Harness will not open debugger for my MatchFoundMessage cloud code. i can see that my MatchFoundMessage code works on Unity. i add some script data and unity gets this.

Hi Ufuk,


Can you double check that you have the debugger turned on in the test harness ? You can see it in the top right hand corner in the statistics window. If that's unticked the debugger won't show up for that message.



Have you tested this with two test harness windows open ? Player A can be in one window and Player B in the other, if set up correctly you should see the debugger run for both players.


Thanks,

Liam

Hi Liam,


All 3 debug options are enabled. i check it as 2 players on the browser. i use windows 10 and the latest version of Chrome. what is your test configuration?

I also tried it with the browser Edge. result is the same. it works for MatchUpdatedMessage. i can see debugger window for this message.

Sorry for misinformation. MatchUpdatedMessage did not work.


i use just this line for match found, notfound and updated messages in user messages part. none of them opens debugger. i can see scriptdata on the inspector so those scripts works but they do not open debugger for me.


Spark.setScriptData("testMessage", "MatchFound");

i recorded a video and submitted a ticket.

Login to post a comment