Skip to content

Instantly share code, notes, and snippets.

@muzudho
Last active June 7, 2017 07:00
Show Gist options
  • Save muzudho/fbc1db8c80c22646ebaa9af4e7897626 to your computer and use it in GitHub Desktop.
Save muzudho/fbc1db8c80c22646ebaa9af4e7897626 to your computer and use it in GitHub Desktop.
ゲーム開発を受注しようぜ<その3> Unity2Dで 画面の中にキャラクターを置こうぜ ref: http://qiita.com/muzudho1/items/4ee198296d620da0b8fa
// Tile1 ゲーム・オブジェクトを作る
GameObject go = new GameObject("Tile1", typeof(SpriteRenderer));
// 在るものから探す場合
// GameObject go = GameObject.Find("Tile1");
SpriteRenderer rend = go.GetComponent<SpriteRenderer>();
rend.sortingLayerName = "Ground";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment