Quantcast
Channel: Photon Unity Networking (PUN) — Photon Engine
Viewing all articles
Browse latest Browse all 8947

How do I Instantiate multiple objects?

$
0
0
I got this code and how do I instantiate multiple objects?

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 ();
Chessmans [x, y].SetPosition (x, y);
activeChessman.Add (go);

}

Viewing all articles
Browse latest Browse all 8947

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>