Hey guys, Making an async game that is working great.
It's a turn based dice game. But i am having trouble with events firing too early.
When i join/rejoin or create a game, I load the scene one the OperationResponse with OperationCode.JoinGame/CreateGame which is the first instance that i know a room was found.
I thought this would be the best way, But it seems at the point after the scene loads but too early for the gameobjects to finish populating that the events fire and the notification i am trying to run gets null references from the scene.
Is there any way to tell photon to runs these events after the scene loads? From what I have heard PUN does this automatically, but i am using the SDK.
To get around this, I have instead saved the event on the room cache and check for it on scene load and perform the action then. Which works fine, But seems kinda clunky to be saving things to the room cache and not using these events at all.
Since its only a basic 2 player game where bets are sent back and forth and i can easily check for certain statuses on refresh is this kinda thing ok? Or am i doing this all wrong? It was quite tough to decipher all this from the memory game demo.
Thanks for any input.
It's a turn based dice game. But i am having trouble with events firing too early.
When i join/rejoin or create a game, I load the scene one the OperationResponse with OperationCode.JoinGame/CreateGame which is the first instance that i know a room was found.
I thought this would be the best way, But it seems at the point after the scene loads but too early for the gameobjects to finish populating that the events fire and the notification i am trying to run gets null references from the scene.
Is there any way to tell photon to runs these events after the scene loads? From what I have heard PUN does this automatically, but i am using the SDK.
To get around this, I have instead saved the event on the room cache and check for it on scene load and perform the action then. Which works fine, But seems kinda clunky to be saving things to the room cache and not using these events at all.
Since its only a basic 2 player game where bets are sent back and forth and i can easily check for certain statuses on refresh is this kinda thing ok? Or am i doing this all wrong? It was quite tough to decipher all this from the memory game demo.
Thanks for any input.