Skip to content

Instantly share code, notes, and snippets.

@muzudho
Last active June 6, 2017 15:19
Show Gist options
  • Save muzudho/32307a3bc34cf6ec9f02de6f904815a5 to your computer and use it in GitHub Desktop.
Save muzudho/32307a3bc34cf6ec9f02de6f904815a5 to your computer and use it in GitHub Desktop.
Unity2Dでタイルマップを敷き詰めてスクロールさせようぜ ref: http://qiita.com/muzudho1/items/061944fdcc73008c822c
// 多分こんな感じで 上に行く
transform.Translate( 0, 200f, 0 );
// スクリプトで コライダーを追加する例
GameObject go = new GameObject("Cell0", typeof(SpriteRenderer), typeof(BoxCollider2D));
BoxCollider2D col = go.GetComponent<BoxCollider2D>();
col.size = new Vector2( 0.4f, 0.4f);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment