So the flow goes like this, You choose to host a game and then you are taken to a screen where a random gameboard is generated. It automatically generates an initial board, but you can press a button to gen more if you are not satisfied with the original.
Since the gameboard has a NetworkIdentity component, during the event handler to the ‘host’ button the gameboard has not spawned yet, so the initial board generation fails. I’m calling NetworkManager.StartHost() before I gen the map, but I guess it spawns in another thread and is still not ready when I call the generation routine. I works when I press the button to gen more boards, but not the initial time.
Is there an easy way to now if an object is spawned and ready? I would like to generate an initial game board as soon as the game starts without requiring an additional button press. How should I handle this?