*Edit, When I run those calls in Unity, it returns and error
I've deleted challenge and event, players from database, challangeInstances and so on.
I can't reproduce the problem again.
Hi Flavio,
The Global ChallengeStartedMessage will be triggered as long the starting conditions of the challenge were met after the other player accepted with the AcceptChallengeRequest. If the challenge has a maxPlayers setting of 2 and an autoStartJoinedChallengeOnMaxPlayers value set to true then the challenge should auto start and the ChallengeStartedMessage will be triggered when the second player accepts. What was the configuration you used when creating the challenge ?
Regards,
Liam
Apparently I was not setting eventAttributes on Unity after setting eventKey, and that triggered the error because my cloudCode was waiting for a Spark.getData.attribute.
When I tested on Harness I've set the attributes manually, but on Unity code I was not declaring it.
Flávio Correia
I've been trying to fix this for hours now ...
I have a takeTurn event properly set (but dont mind the attributes for now), and a TurnBased challenge created with consumer takeTurn.
I've set to consume a turn on GlobalMessages, ChallengeStartedMessage
If I send and acept challenge in TestHarness, then Turn is consumed , status changes to running and I can do a LogChallengeEvent takeTurn in Harness and properly see on Client that a turn has been consumed because I have ChallengeTurnTakenListeners and Handlers that are triggered everytime a turn is consumed (that gets challengeId just for debug ).
However... when I run :
Yes I have custom SDK imported.
Even If I run :
challengeId is correct because I use it in the same script on new AcceptChallengeRequest().SetChallengeInstanceId(challengeId)
Wich Works properly.
IT's not my cloudCode , because it Works in testHarness... and i don't see any problem with my code.
Is it possible that when I acceptChallengeRequest in Unity, GlobalMessages, ChallengeStartedMessage is not being triggered and then it's not my turn and gives me an error?
(Im gonna debug this quick, but i don't think that's it ...)