Skip to content

Instantly share code, notes, and snippets.

@SocketWeaver
Created June 16, 2019 23:26
Show Gist options
  • Save SocketWeaver/5ad4b1b9f2c04460866202f4330b1ce8 to your computer and use it in GitHub Desktop.
Save SocketWeaver/5ad4b1b9f2c04460866202f4330b1ce8 to your computer and use it in GitHub Desktop.
Add a method in the GameSceneManager.cs script to handle the OnReady event of the SceneSpawner.
public void OnSpawnerReady(bool alreadySetup)
{
Debug.Log("OnSpawnerReady " + alreadySetup);
if (!alreadySetup)
{
int spawnPointIndex = Random.Range(0, 3);
NetworkClient.Instance.LastSpawner.SpawnForPlayer(0, spawnPointIndex);
NetworkClient.Instance.LastSpawner.PlayerFinishedSceneSetup();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment