- Home /
Question by
Gascoine_17 · Feb 16, 2017 at 02:58 PM ·
unity 5instantiatephotonmultiplayer-networking
How do I instantiate multiple game objects using Photon unity network?
Here's my code on spawning a chess piece, but I want to do it on Photon Unity Network, How do I do that? Thanks.
private void SpawnChessman(int index, int x, int y)
{
GameObject go = Instantiate (chessmanPrefabs [index], GetTileCenter(x,y), Quaternion.identity) as GameObject;
go.transform.SetParent (transform);
Chessmans [x, y] = go.GetComponent<Chessman> ();
Chessmans [x, y].SetPosition (x, y);
activeChessman.Add (go);
}
Comment