ºÇ½ª¹¹¿·¡§
orika_ex_miyako 2022ǯ05·î26Æü(ÌÚ) 11:59:18ÍúÎò
¼ê½ç£´¡¡¡¼Tile Pallete ¤È TileMap ¤ÎºîÀ®¡¼
¡¡£¶¡¥Tile Pallete ¤ÎºîÀ® ¡¡£·¡¥TileMap ¤ÎºîÀ®
¡¡¿·¤·¤¤³Ø½¬ÆâÍƤϡ¢°Ê²¼¤ÎÄ̤ê¤Ç¤¹¡£
¡¡¡¦Tile Pallete ¤òÍøÍѤ·¤¿ Tilemap ¤ÎºîÀ®ÊýË¡ ¡¡¡¦Sorting Layer ¤ÎÀßÄê
¡¡TileMap(¥¿¥¤¥ë¥Þ¥Ã¥×) ¤È¤Ï Unity ¤Îµ¡Ç½¤Î£±¤Ä¤Ç¤¹¡££²£Ä¥²¡¼¥à¤Î¥·¡¼¥ó¤Ë Sprite ²èÁü¤ò¸µ¤Ë¤·¤¿¥¿¥¤¥ë¤òºîÀ®¤·¡¢¤½¤Î¥¿¥¤¥ë¤òÅù´Ö³Ö¤Ëʤ٤ÆÀßÃÖ¤¹¤ë¤³¤È¤¬½ÐÍè¤Þ¤¹¡£
¤Þ¤¿¡¢¥³¥é¥¤¥À¡¼¤ò»ý¤¿¤»¤ë¤³¤È¤â½ÐÍè¤ë¤¿¤á¡¢Î㤨¤Ð¡¢£Ò£Ð£Ç¤Î»³¤äÀî¤È¤¤¤Ã¤¿¿¯ÆþÉÔ²Äǽ¤ÊÃÏ·Á¤ÎÀßÄê¤ò¥¿¥¤¥ë¼«ÂΤ˹Ԥ¦¤³¤È¤¬½ÐÍè¤Þ¤¹¡£
»²¹Í¥µ¥¤¥È
Unity¸ø¼°¥Þ¥Ë¥å¥¢¥ë
¥¿¥¤¥ë¥Þ¥Ã¥×
https://docs.unity3d.com/ja/2019.4/Manual/class-Ti...
¡¡¥Þ¥Ë¥å¥¢¥ë°Ê³°¤Ë¤â¡¢Â¿¤¯¤Îͱפʵ»ö¤¬¤¢¤ê¤Þ¤¹¤Î¤Ç¤½¤¦¤¤¤Ã¤¿¤â¤Î¤ò»²¹Í¤Ë¤¹¤ë¤È¤¤¤¤¤Ç¤·¤ç¤¦¡£
¡¡TileMap ¤ò°·¤¦¤¿¤á¤Ë¤Ï¡¢Tile Palette(¥¿¥¤¥ë¡¦¥Ñ¥ì¥Ã¥È) ¤È¤¤¤¦¥¦¥¤¥ó¥É¥¦¤ò³«¤¤¤Æ¡¢¤½¤ÎÃæ¤ËºîÀ®¤Ç¤¤ë Pallete(¥Ñ¥ì¥Ã¥È)¤Ë¡¢Unity ¤Ø¥¤¥ó¥Ý¡¼¥È¤·¤¿²èÁü¥Õ¥¡¥¤¥ë¤òÀßÄꡦÅÐÏ¿¤·¤Þ¤¹¡£
¤³¤Î¥Ñ¥ì¥Ã¥È¤Ë¤ÏÊ£¿ô¤Î²èÁü¤òÅÐÏ¿¤Ç¤¤Þ¤¹¡£¥Ñ¥ì¥Ã¥È¤Ë²èÁü¥Õ¥¡¥¤¥ë¤òÀßÄꤹ¤ë¤È¡¢¤½¤ì¤¬¥¿¥¤¥ë¤È¤·¤ÆÅÐÏ¿¤µ¤ì¤Þ¤¹¡£
¡¡¥Ñ¥ì¥Ã¥È¤È¤¤¤¦Ì¾¾Î¤¬É½¤¹¤è¤¦¤Ë¡¢¤³¤³¤ËÅÐÏ¿¤·¤¿¥¿¥¤¥ë¤Ï³¨¤Î¶ñ¤Î¤è¤¦¤Ë£±¤Ä¤º¤ÄÁªÂò¤ò¤·¤Æ¡¢ Scene ¥Ó¥å¡¼¤Ë¼«Í³¤ËÇÛÃÖ¤·¤Æ¤¤¤¯¤³¤È¤¬½ÐÍè¤Þ¤¹¡£
¡¡¥Ñ¥ì¥Ã¥È¤ÏÊ£¿ôºîÀ®¤¹¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¤Î¤Ç¡¢Î㤨¤Ð¡¢¥Õ¥£¡¼¥ë¥ÉÍѤβèÁü¤ò¤¢¤Ä¤á¤¿¥Ñ¥ì¥Ã¥È¡¢³¹¤Î²èÁü¤ò¤¢¤Ä¤á¤¿¥Ñ¥ì¥Ã¥È¤È¤¤¤¦¤è¤¦¤Ë
¥Ñ¥ì¥Ã¥È¤ò»ÈÍѤ¹¤ëÍÑÅÓ¤´¤È¤Ë¼ïÎàʬ¤±¤ò¤·¤ÆºîÀ®¤ò¤·¤Æ¤ª¤¯¤È¡¢²èÁü¥Õ¥¡¥¤¥ë¤Î´ÉÍý¤·¤ä¤¹¤¯¡¢¥Ñ¥ì¥Ã¥È¼«ÂΤâ»È¤¤¤ä¤¹¤¯¤â¤Ê¤êÊØÍø¤Ç¤¹¡£
¡¡¤½¤ì¤Ç¤ÏºÇ½é¤Ë¡¢¥Ñ¥ì¥Ã¥È¤òºîÀ®¤¹¤ë¤¿¤á¤ËɬÍ×¤Ê Tile Pallete ¥¦¥¤¥ó¥É¥¦¤Îɽ¼¨¤ò¹Ô¤¤¤Þ¤¹¡£
¡¡
¡¡Unity Editor ¤Îº¸¾å¤Ë¤¢¤ë¥á¥Ë¥å¡¼¤è¤ê¡¢ Window => 2D => Tile Palette ¤ò½çÈÖ¤ËÁªÂò¤·¤Þ¤¹¡£
Tile Pallete ¤È¤¤¤¦¥¦¥¤¥ó¥É¥¦¤¬³«¤¤Þ¤¹¤Î¤Ç¡¢Ç¤°Õ¤Î°ÌÃÖ¤ËÀßÃÖ¤·¤Æ¤¯¤À¤µ¤¤¡£
Tab ¤ò¥É¥é¥Ã¥°¥¢¥ó¥É¥É¥í¥Ã¥×¤¹¤ë¤³¤È¤Ç¡¢Â¾¤Î Tab ¤ÈƱ¤¸°ÌÃ֤ˤâ°ÜÆ°¤Ç¤¤Þ¤¹¡£
Tile Pallete ¥¦¥¤¥ó¥É¥¦
![](https://image02.seesaawiki.jp/i/o/i-school-memo/eV0vPEuQRx.png)
![](https://image01.seesaawiki.jp/i/o/i-school-memo/BIq2PXCpI1.png)
¡¡¤½¤Î¤Þ¤ÞÆÈΩ¤·¤¿¥¦¥¤¥ó¥É¥¦¤Î¾õÂ֤ˤ·¤Æ¤ª¤¤¤Æ¤â¤è¤¤¤Ç¤¹¤¬¡¢²¼µ¤Î²èÁü¤Î¤è¤¦¤Ë Scene¥Ó¥å¡¼ ¤È¾å²¼¤Ëʤ٤ÆÇÛÃÖ¤¹¤ë¤È¡¢
Tile Pallete ¤ÇÁªÂò¤·¤¿¤â¤Î¤ò¤½¤Î¤Þ¤Þ Scene ¥Ó¥å¡¼¤ËÀßÃ֤Ǥ¤ë¤è¤¦¤Ê¥ì¥¤¥¢¥¦¥È¤Ë¤Ê¤ë¤¿¤á¡¢À½ºîºî¶È¤¬³Ú¤Ë¤Ê¤ê¤Þ¤¹¡£
¤³¤ÎÊÕ¤ê¤Ï¼ÂºÝ¤Ë¼«Ê¬¤Çºî¶È¤ò¹Ô¤¤¤Ê¤¬¤é¡¢°ìÈÖ¤ä¤ê¤ä¤¹¤¤ÊýË¡¤ò¸«¤Ä¤±¤Æ¤¯¤À¤µ¤¤¡£
¥ì¥¤¥¢¥¦¥È»²¹Í¿Þ(Scene¥Ó¥å¡¼ ¤ÈÊ̤ÎÉôʬ¤ËÇÛÃÖ¤·¤Æ¡¢Î¾Êý¤¬ Tab ¤ÎÀÚ¤êÂؤ¨¤Ê¤·¤Ç¸«¤ì¤ë¾õÂ֤ˤ¹¤ë)
![](https://image02.seesaawiki.jp/i/o/i-school-memo/DSgljA9YDq.png)
¡¡Tile Pallete ¥¦¥¤¥ó¥É¥¦Æâ¤Îº¸¾å¤Ë¤¢¤ë Create New Palette ¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤·¤Æ¤¯¤À¤µ¤¤¡£¥¯¥ê¥Ã¥¯¤¹¤ë¤È¥Ý¥Ã¥×¥¢¥Ã¥×¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£
¤³¤ì¤¬¿·¤·¤¯ºîÀ®¤¹¤ë¥Ñ¥ì¥Ã¥È¤Î¾ðÊó¤ÎÀßÄêÉôʬ¤Ë¤Ê¤ê¤Þ¤¹¡£
¡¡Name ¤ÎÉôʬ¤Ë¥Ñ¥ì¥Ã¥È¤Î̾Á°¤òÅÐÏ¿¤·¤Þ¤¹¡£À½ºî¤¹¤ë¾ìÌ̤´¤È¤Ë¥Ñ¥ì¥Ã¥È¤ò»È¤¤Ê¬¤±¤Þ¤¹¤Î¤Ç¡¢¥Õ¥£¡¼¥ë¥É¤ò¥Ç¥¶¥¤¥ó¤¹¤ë¾ì¹ç¤Ë¤Ï¡¢Field_0¡¢¤ä Field¡¢
³¹Æâ¤ò¥Ç¥¶¥¤¥ó¤¹¤ë¾ì¹ç¤Ë¤Ï City_0¡¢Town ¤Ê¤É¤Î̾¾Î¤Ë¤·¤Æ¤¯¤À¤µ¤¤¡£¤½¤Î¾¤Î£²¤«½ê¤ÎÀßÄê¤ÎÊѹ¹¤ÏÉÔÍפǤ¹¡£
¡¡¡¡¡¡
¡¡Name Êѹ¹¸å¤Ë Create ¥Ü¥¿¥ó¤ò²¡¤¹¤ÈÊݸÀè¤òÁªÂò¤¹¤ë¥¦¥¤¥ó¥É¥¦¤¬³«¤¤Þ¤¹¤Î¤Ç¡¢Ç¤°Õ¤Î¾ì½ê¤ËÊݸ¤·¤Þ¤¹¡£
º£²ó¤Ï Assets¤Î²¼¤Ë TileMaps/Fields ¤È¤¤¤¦¥Õ¥©¥ë¥À¤òºî¤Ã¤ÆÊݸ¤·¤Æ¤¤¤Þ¤¹¡£
ÊݸÀè¤Î¥Õ¥©¥ë¥À
![](https://image01.seesaawiki.jp/i/o/i-school-memo/DolAxuTv8I.png)
¡¡¤³¤ì¤Ç¿·¤·¤¤¥Ñ¥ì¥Ã¥È¤¬ºîÀ®¤µ¤ì¤Þ¤·¤¿¡£
¿·¤·¤¯ºîÀ®¤µ¤ì¤¿¥Ñ¥ì¥Ã¥È(Create New Pallete ¤ÎÉôʬ¤¬¡¢ºîÀ®¤·¤¿¥Ñ¥ì¥Ã¥È̾¤Ë¤Ê¤Ã¤Æ¤¤¤ë)
![](https://image01.seesaawiki.jp/i/o/i-school-memo/2ZJ6N0lhZI.png)
¡¡¥Ñ¥ì¥Ã¥È¤ÎÃæ¿È¤Ï¶õ¤Ã¤Ý¤Ç¤¹¤Î¤Ç¡¢¼¡¤Ë²èÁü¤òÅÐÏ¿¤·¤Þ¤¹¡£
¡¡¥Ñ¥ì¥Ã¥ÈÆâ¤Î Drag Tile, Sprite or Sprite Texture assets here. ¤È½ñ¤«¤ì¤Æ¤¤¤ë¤È¤³¤í¤Ë¡¢²èÁü¥Õ¥¡¥¤¥ë¤ò¥É¥é¥Ã¥°¥¢¥ó¥É¥É¥í¥Ã¥×¤ò¤¹¤ë¤³¤È¤Ç¥¿¥¤¥ë¤È¤·¤ÆÅÐÏ¿¤Ç¤¤Þ¤¹¡£
¤³¤Î¤È¤¡¢Ê¬³ä¤·¤Æ¤¤¤Ê¤¤¥Õ¥¡¥¤¥ë¤ä¡¢TextureType ¤¬ Sprite ¤ËÀßÄꤷ¤Æ¤¤¤Ê¤¤²èÁü¥Õ¥¡¥¤¥ë¤ÏÅÐÏ¿¤Ç¤¤Þ¤»¤ó¡£
¡¡²èÁü¥Õ¥¡¥¤¥ë¤ò¥É¥é¥Ã¥°¥¢¥ó¥É¥É¥í¥Ã¥×¤¹¤ë¤È¡¢Generate New Tile ¤È¤¤¤¦ÊݸÀè¤òÀßÄꤹ¤ë¥¦¥¤¥ó¥É¥¦¤¬³«¤¤Þ¤¹¡£
¤³¤ì¤Ï¡¢²èÁü¥Õ¥¡¥¤¥ë¤ò¥¿¥¤¥ë¤È¤·¤ÆÅÐÏ¿¤·¤Þ¤¹¤Î¤Ç¡¢¤½¤ÎÊݸÀè¤òÁªÂò¤·¤Æ¤¯¤À¤µ¤¤¡¢¤È¤¤¤¦ÆâÍƤˤʤê¤Þ¤¹¡£
Ǥ°Õ¤Î¥Õ¥©¥ë¥À¤ËÊݸ¤·¤Æ¤¯¤À¤µ¤¤¡£º£²ó¤Ï Assets/TileMap/Fields ¤ÎÃæ¤Ë¤¹¤Ù¤ÆÊݸ¤·¤Æ¤¤¤Þ¤¹¡£
¡¡³Ð¤¨¤Æ¤¤¤¿¤À¤¤¿¤¤¤³¤È¤Ï¡¢TileMap ¤Î¥Ñ¥ì¥Ã¥ÈÍѤ˿·¤·¤¯£±¤Ä¤Î¥Õ¥¡¥¤¥ë¤¬ºîÀ®¤µ¤ì¤Æ¤ª¤ê¡¢
¤½¤Î¥Ñ¥ì¥Ã¥È¤ËÅÐÏ¿¤·¤¿²èÁü¥Õ¥¡¥¤¥ë£±¤Ä¤Ë¤Ä¤¡¢¥¿¥¤¥ëÍѤΥե¡¥¤¥ë¤¬¿·¤·¤¯ºîÀ®¤µ¤ì¤ë¤È¤¤¤¦Éôʬ¤Ç¤¹¡£
²èÁü¥Õ¥¡¥¤¥ë¤ò¤½¤Î¤Þ¤ÞÍøÍѤ·¤Æ¤¤¤ë¤Î¤Ç¤Ï¤Ê¤¯¡¢²èÁü¥Õ¥¡¥¤¥ë¤ò¸µ¤Ë¥¿¥¤¥ëÍѤΥե¡¥¤¥ë¤¬ºî¤é¤ì¤Æ¤¤¤Þ¤¹¡£
¤½¤Î¤¿¤á¡¢¥¿¥¤¥ë¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤â¤Î¤Ï¡¢¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤Î¾ðÊó¤â²èÁü¥Õ¥¡¥¤¥ë¤È¤Ï°Û¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£
¥¿¥¤¥ëÅÐÏ¿¸å¤Î¥Õ¥©¥ë¥À²èÁü(Field_0 ¤¬¥Ñ¥ì¥Ã¥È¤Î¥Õ¥¡¥¤¥ë¡¢Â¾¤Ï¥¿¥¤¥ë¤È¤·¤ÆÅÐÏ¿¤µ¤ì¤¿¥Õ¥¡¥¤¥ë)
![](https://image01.seesaawiki.jp/i/o/i-school-memo/cfBcszdEeY.png)
¥¿¥¤¥ëÍѤΥե¡¥¤¥ë¤Î¥¤¥ó¥¹¥Ú¥¯¥¿¡¼(³ÈÄ¥»Ò¤Ï .asset ¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£¸µ¤Î²èÁü¥Õ¥¡¥¤¥ë¤Ï .png ¤Ç¤¹)
![](https://image02.seesaawiki.jp/i/o/i-school-memo/iGnCUOxQE7.png)
¡¡²èÁü¥Õ¥¡¥¤¥ë¤ò¼«Í³¤ËÆɤ߹þ¤Þ¤»¤Æ¥¿¥¤¥ë¤È¤·¤ÆÅÐÏ¿¤·¤Æ¤¯¤À¤µ¤¤¡£
²¼µ¤Î²èÁü¤Ç¤ÏÃÏ·Á¤´¤È¤Ëʬ¤±¤Æ¤¤¤Þ¤¹¤¬¡¢¶õ¤¤¤Æ¤¤¤ë¾ì½ê¤Ç¤¢¤ì¤Ð¤É¤ÎÉôʬ¤ËÅÐÏ¿¤·¤Æ¤âÌäÂꤢ¤ê¤Þ¤»¤ó¡£
¼«Ê¬¤Î»È¤¤¤ä¤¹¤¤°ÌÃÖ¤ËÅÐÏ¿¤·¤Æ¤¯¤À¤µ¤¤¡£¤Þ¤¿¡¢ÅÐÏ¿¤·¤¿¥¿¥¤¥ë¤Ï¥É¥é¥Ã¥°¥¢¥ó¥É¥É¥í¥Ã¥×¤Ç°ÜÆ°¤Ç¤¤Þ¤¹¡£
¥Ñ¥ì¥Ã¥È¤Ë²èÁü¤òÅÐÏ¿¸å¡
![](https://image02.seesaawiki.jp/i/o/i-school-memo/cKW9MdKClg.png)
¥Ñ¥ì¥Ã¥È¤Ë²èÁü¤òÅÐÏ¿¸å¢
![](https://image02.seesaawiki.jp/i/o/i-school-memo/qWNnt584or.png)
¡¡°Ê¾å¤Ç TileMap ¤ÎºîÀ®¤ËÍøÍѤ¹¤ë¥Ñ¥ì¥Ã¥È¤Ï´°À®¤Ç¤¹¡£¼¡¤Ï¤³¤Î¥Ñ¥ì¥Ã¥È¤ËÅÐÏ¿¤·¤¿¥¿¥¤¥ë¤ò Scene ¥Ó¥å¡¼Æâ¤Ëʤ٤Ƥ¤¤¯¼ê½ç¤ò¹Ô¤¤¤Þ¤¹¡£
¡¡TileMap ¤ËÍøÍѤǤ¤ë¥¿¥¤¥ë¤ò¥Ñ¥ì¥Ã¥È¤ËÅÐÏ¿¤·¤Þ¤·¤¿¤Î¤Ç¡¢¤³¤Á¤é¤ò³èÍѤ·¤Æ¡¢TileMap ¤òºîÀ®¤·¤Æ¤¤Þ¤¹¡£
»²¹Í´°À®¿Þ
![](https://image02.seesaawiki.jp/i/o/i-school-memo/T1rJSdEiXG.jpg)
¡¡
¡¡º£²ó¤ÏºîÀ®¤·¤Þ¤»¤ó¤¬¡¢Ï»³Ñ·Á¤Î¥¿¥¤¥ë¤ä¡¢¥¯¥©¡¼¥¿¡¼¥Ó¥å¡¼¤Î¤è¤¦¤Ê±ü¹Ô¤¤Î¤¢¤ë¥¿¥¤¥ë¤âºîÀ®¤Ç¤¤Þ¤¹¡£
²¼µ¤Î¥µ¥¤¥È¤¬Èó¾ï¤Ë»²¹Í¤Ë¤Ê¤ê¤Þ¤¹¤Î¤Ç¡¢ÌܤòÄ̤·¤Æ¤ª¤¤¤Æ¤¯¤À¤µ¤¤¡£
»²¹Í¥µ¥¤¥È
¤ì¡¼¡÷DKRevel ÍÍ ¥²¡¼¥à¤Îºî¤êÊý
Unity Tilemap¤Î»È¤¤Êý
https://dkrevel.com/tilemap/
¡¡TileMap ¤Ç¤¹¤¬¡¢£±¤Ä¤ÎTileMap ¤Ë¤¹¤Ù¤Æ¤Î¥¿¥¤¥ë¤òÇÛÃÖ¤¹¤ëÊýË¡¤â¤¢¤ê¤Þ¤¹¤¬¡¢
º£²ó¤Ï¥ì¥¤¥ä¡¼¹½Â¤¤ò»È¤Ã¤Æ¡¢Ê£¿ô¤Î TileMap ¤ò¤Ä¤¯¤ê¡¢¤½¤ì¤ò½Å¤Í¤Æ£±¤Ä¤Î¥²¡¼¥à²èÌ̤Ȥ·¤Æ¹½À®¤ò¹Ô¤¤¤Þ¤¹¡£
¥Ò¥¨¥é¥ë¥¡¼²èÁü
![](https://image01.seesaawiki.jp/i/o/i-school-memo/vRneyssbhT.png)
¡¡¥Ò¥¨¥é¥ë¥¡¼²èÁü¤ò¸«¤Æ¤¤¤¿¤À¤¯¤È¤ï¤«¤ë¤è¤¦¤Ë¡¢£³¤Ä¤Î Grid ¤È¤¤¤¦¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬¤¢¤ê¡¢
¤³¤ì¤é¤¬ TileMap ¤ò¹½À®¤·¤Æ¤¤¤Þ¤¹¡£
¡¡Grid_Base ¤ÏºÇ¤âÇØÌ̤ˤʤ륿¥¤¥ë¤Ç¤¹¡£¤³¤ì¤Ï²¼ÃϤȤʤëÈϰϤòÀßÄꤷ¤Þ¤¹¤Î¤Ç¡¢²èÌÌ°ìÇÕ¤ËÉߤµÍ¤á¤ë¤è¤¦¤Ë¤·¤Þ¤¹¡£
Î㤨¤Ð¡¢ÁðÃÏ¡¢º½ÃÏ¡¢ÀÐÃϤʤɤǤ¹¡£¤³¤³¤Ï¥¥ã¥é¤Î°ÜÆ°¤Ç¤¤ëÈϰϤǤ¹¡£
Grid_Base
![](https://image02.seesaawiki.jp/i/o/i-school-memo/sdiITyftJs.jpg)
¡¡Â³¤¤¤Æ¡¢Grid_Walk ¤Ç¤Ï¡¢²¼ÃϤξåÌ̤ËÉÁ²è¤·¡¢¥¥ã¥é¤Î°ÜÆ°¤Ç¤¤ë¥¿¥¤¥ë¤ò½Å¤Í¤ë¤è¤¦¤ËÇÛÃÖ¤·¤Þ¤¹¡£
Î㤨¤Ð¡¢¿¹¡¦¼¾ÃÏ¡¦Ä㤤»³¤È¤¤¤Ã¤¿¥¿¥¤¥ë¤Ë¤Ê¤ê¤Þ¤¹¡£¤³¤³¤âƱ¤¸¤¯¡¢¥¥ã¥é¤Î°ÜÆ°¤Ç¤¤ëÈϰϤˤʤê¤Þ¤¹¡£
Grid‗Walk
![](https://image01.seesaawiki.jp/i/o/i-school-memo/uvxUgg_blD.png)
¡¡ºÇ¸å¤Î Grid‗Collider ¤Ï¤½¤ÎÄ̤ꡢ¥³¥é¥¤¥À¡¼¤òÀßÄꤷ¤Æ¡¢¥¥ã¥é¤¬¿¯Æþ¤Ç¤¤Ê¤¤¤è¤¦¤Ë¤·¤¿¤¤¥¿¥¤¥ë¤òÀßÃÖ¤·¤Þ¤¹¡£
Î㤨¤Ð¡¢Àî¡¢³¤¡¢¹â¤¤»³¤Ê¤É¤Ç¤¹¡£¤³¤³¤Ë¤Ï¥³¥é¥¤¥À¡¼¤òÀßÄꤹ¤ë¤Î¤Ç¡¢¥¥ã¥é¤Ï¿¯Æþ¤Ç¤¤Ê¤¤¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£
¤Þ¤¿¡¢Grid_Base ¤Î¼þ°Ï¤ò»ÍÊý¤°¤ë¤Ã¤È°Ï¤à¤è¤¦¤ËÇÛÃÖ¤¹¤ë¤³¤È¤Ç¡¢¥¥ã¥é¤Î°ÜÆ°¤Ç¤¤ëÈϰϤòÀ©¸Â¤Ç¤¤Þ¤¹¡£
Grid_Collider
![](https://image02.seesaawiki.jp/i/o/i-school-memo/Jad5ohYiPB.png)
¡¡¤³¤Î¥ì¥¤¥ä¡¼¹½Â¤¤Ë¤è¤ëÍøÅÀ¤Ï¡¢¥¿¥¤¥ë¤ÎÀßÃ֤ȴÉÍý¤Î¤·¤ä¤¹¤µ¡¢¤½¤·¤Æ¥³¥é¥¤¥À¡¼¤ÎÀßÄê¤Ç¤¹¡£
¡¡TileMap ¤Ë¤Ïµ¡Ç½¤È¤·¤Æ¡¢¥¿¥¤¥ë¤Î¼ïÎऴ¤È¤Ë¥³¥é¥¤¥À¡¼¤òÀßÄê¤Ç¤¤Þ¤¹¡£
Î㤨¤Ð¹â¤¤»³¤Î¥¿¥¤¥ë¤Ë¥³¥é¥¤¥À¡¼¤òÀßÄꤹ¤ì¤Ð¡¢Scene¥Ó¥å¡¼ ¤ËÇÛÃÖ¤µ¤ì¤ë¹â¤¤»³¤Î¥¿¥¤¥ë¤Ï¼«Æ°Åª¤Ë¤¹¤Ù¤Æ¥³¥é¥¤¥À¡¼¤òÀßÄꤵ¤ì¤¿¾õÂ֤ˤʤê¤Þ¤¹¤Î¤Ç¡¢
¹â¤¤»³¤Î¥¿¥¤¥ë£±¤Ä£±¤Ä¤Ë¸ÄÊ̤ǥ³¥é¥¤¥À¡¼¤ÎÀßÄê¤ò¹Ô¤¦É¬Íפ¬¤¢¤ê¤Þ¤»¤ó¡£
¡¡ºîÀ®¸å¡¢¤³¤ì¤é¤ò½Å¤Í¤ë¤Ë¤¢¤¿¤ê¡¢Sorting Layer ¤Îµ¡Ç½¤òÍøÍѤ¹¤ë¤³¤È¤Ç¡¢²èÌ̤ËÉÁ²è¤¹¤ëÍ¥Àè½ç°Ì¤òǤ°Õ¤ËÊѹ¹¤Ç¤¤Þ¤¹¡£
¤³¤ì¤ÏÄ̾ï¤Î Layer ¤È¤ÏÊ̤ε¡Ç½¤Ç¤¹¡£
¡¡¤½¤Î¤¿¤á¡¢Base => Walk => Collider ¤È¤¤¤¦Í¥Àè½ç°Ì¤Ë¤·¤¿ Sorting Layer ¤òÀßÄꤹ¤ë¤È¡¢´°À®¿Þ¤Î¤è¤¦¤Ë£±¤Ä¤Î¥²¡¼¥à²èÌ̤Ȥ·¤Æ¹½ÃÛ¤¹¤ë¤³¤È¤¬½ÐÍè¤Þ¤¹¡£
»²¹Í´°À®¿Þ
![](https://image02.seesaawiki.jp/i/o/i-school-memo/T1rJSdEiXG.jpg)
¡¡
¡¡¤Þ¤º¤ÏºÇ½é¤Ë¡¢Sorting Layer ¤òºîÀ®¤·¡¢¤½¤ì¤«¤é½çÈ֤ˣ±¤Ä¤º¤Ä TileMap ¤òºîÀ®¤·¤Æ¤¤¤¤Þ¤¹¡£
¡¡ÅÐÏ¿¤Î¼ê½ç¤Ï£²¤Ä¤¢¤ê¤Þ¤¹¡£¤É¤Á¤é¤Ç¤â¹½¤¤¤Þ¤»¤ó¡£
¡¡¤É¤Î¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ç¤â¹½¤¤¤Þ¤»¤ó¤Î¤Ç¥Ò¥¨¥é¥ë¥¡¼¤è¤êÁªÂò¤·¤Æ¡¢¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤Î¾åÉô¤Ë¤¢¤ë Layer ¤ò¥¯¥ê¥Ã¥¯¤·¤Æ¤¯¤À¤µ¤¤¡£
¥×¥ë¥À¥¦¥ó¥á¥Ë¥å¡¼¤¬³«¤¤Þ¤¹¤Î¤Ç¡¢°ìÈÖ²¼¤Ë¤¢¤ë Add Layers ¡Ä ¤òÁªÂò¤·¤Æ¤¯¤À¤µ¤¤¡£
¡¡¤¢¤ë¤¤¤Ï Unity Editor ¤Îº¸¾å¤Ë¤¢¤ë¥á¥Ë¥å¡¼¤è¤ê¡¢ Edit => Project Settings ¤Ë¤Æ Project Settings ¥¦¥¤¥ó¥É¥¦¤ò³«¤¤¤Æ¡¢
º¸Â¦¤Î¥á¥Ë¥å¡¼¤è¤ê Tag & Layers ¤òÁªÂò¤·¤Æ¤¯¤À¤µ¤¤¡£
¡¡Tag & Layers ¤Î¹àÌÜÆâ¤Î¾å¤«¤é£²ÈÖÌÜ¤Ë Sorting Layers ¤¬¤¢¤ê¤Þ¤¹¡£
°ìÈÖ²¼¤Î Layers ¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¤Î¤Ç´Ö°ã¤¨¤Ê¤¤¤è¤¦¤Ë¤·¤Æ¤¯¤À¤µ¤¤¡£
¡¡²¼µ¤Î²èÁü¤Î¤è¤¦¤Ë¡¢Walk¡¢Collider¡¢Chara ¤È£³¤Ä¤ò½çÈÖ¤ËÅÐÏ¿¤·¤ÆÀßÄꤷ¤Æ¤¯¤À¤µ¤¤¡£
²¼¤Ë¤¢¤ëÀßÄê¹àÌܤۤɲèÌ̤ËÉÁ²è¤µ¤ì¤ëÍ¥Àè½ç°Ì¤¬¹â¤¯¤Ê¤ê¤Þ¤¹¤Î¤Ç¡¢ÀßÄꤹ¤ë½çÈ֤ˤÏÃí°Õ¤·¤Æ¤¯¤À¤µ¤¤¡£
½çÈÖ¤¬°ã¤¦¤ÈÍ¥Àè½ç°Ì¤¬ÊѤï¤ë¤¿¤á¡¢Àµ¾ï¤Ë²èÌ̤Ëɽ¼¨¤µ¤ì¤Þ¤»¤ó¡£
¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤è¤êÊѹ¹¤·¤Æ¤¤¤ë¾ì¹ç
![](https://image01.seesaawiki.jp/i/o/i-school-memo/cdHKX9u5eh.png)
Project Settings ¤è¤êÊѹ¹¤·¤Æ¤¤¤ë¾ì¹ç
![](https://image01.seesaawiki.jp/i/o/i-school-memo/q2vm5_7yqf.png)
¡¡°Ê¾å¤Ç Sorting Layer ¤ÎÀßÄê¤Ï´°Î»¤Ç¤¹¡£
¡¡Ê£¿ô¤Î TileMap ¤òºîÀ®¤·¤Þ¤¹¤Î¤Ç¡¢¤½¤ì¤ò´ÉÍý¤¹¤ë¤¿¤á¤Î¥Õ¥©¥ë¥ÀÌò¤Î¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òºîÀ®¤·¤Þ¤¹¡£
¡¡¥Ò¥¨¥é¥ë¥¡¼¤Î¶õ¤¤¤Æ¤¤¤ë¾ì½ê¤Ç±¦¥¯¥ê¥Ã¥¯¤ò¤·¤Æ¥á¥Ë¥å¡¼¤ò³«¤¡¢Create Empty ¤òÁªÂò¤·¤Þ¤¹¡£
¿·¤·¤¤¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬£±¤ÄºîÀ®¤µ¤ì¤Þ¤¹¤Î¤Ç¡¢Ì¾Á°¤ò MainMap ¤ËÊѹ¹¤·¤Æ¤¯¤À¤µ¤¤¡£
¥Ò¥¨¥é¥ë¥¡¼²èÁü
![](https://image02.seesaawiki.jp/i/o/i-school-memo/ZEJ967EwXa.png)
¡¡¤â¤·¤â Transform ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Î Position ¤¬ (0, 0, 0) ¤Ç¤Ï¤Ê¤¤¾ì¹ç¤Ë¤Ï¡¢(0, 0, 0) ¤ËÀßÄꤷ¤Æ¤ª¤¤¤Æ¤¯¤À¤µ¤¤¡£
¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
![](https://image01.seesaawiki.jp/i/o/i-school-memo/P7HuNPlUOh.png)
¡¡°Ê¾å¤Ç¤³¤Î¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ï´°À®¤Ç¤¹¡£
¡¡MainMap ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤È¤·¤Æ¡¢½çÈÖ¤Ë TileMap ¤òºîÀ®¤·¤Æ¤¤¤¤Þ¤¹¡£
¡¡¥Ò¥¨¥é¥ë¥¡¼¾å¤Î MainMap ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÁªÂò¤·¤Æ±¦¥¯¥ê¥Ã¥¯¤ò¤·¤Æ¥á¥Ë¥å¡¼¤ò³«¤¡¢
2D Object => Tilemap ¤òÁªÂò¤·¤Æ¤¯¤À¤µ¤¤¡£MainMap ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤È¤·¤Æ
Grid ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¢¤½¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤È¤·¤Æ Tilemap ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬ºîÀ®¤µ¤ì¤Þ¤¹¡£
¥Ò¥¨¥é¥ë¥¡¼²èÁü
![](https://image01.seesaawiki.jp/i/o/i-school-memo/L0niRZiKwi.png)
¡¡Grid ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î̾Á°¤ò Grid_Base ¤ËÊѹ¹¤·¤Æ¤¯¤À¤µ¤¤¡£
¥Ò¥¨¥é¥ë¥¡¼²èÁü
![](https://image01.seesaawiki.jp/i/o/i-school-memo/RtNJ0zPr2b.png)
¡¡¤½¤ì°Ê³°¤ÎÊѹ¹¤ÏÉÔÍפǤ¹¡£
¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
![](https://image02.seesaawiki.jp/i/o/i-school-memo/OQUDqjCeST.png)
¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
![](https://image01.seesaawiki.jp/i/o/i-school-memo/HiAGgKYupw.png)
¡¡¤½¤ì¤Ç¤Ï¡¢¥¿¥¤¥ë¤òÇÛÃÖ¤·¤Æ¤¤¤¤Þ¤¹¡£
¡¡Grid_Base ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤Ç¤¢¤ë Tilemap ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÁªÂò¤·¤¿¾õÂ֤ˤ·¤Æ¤¯¤À¤µ¤¤¡£
¤³¤Î¤È¤¤ËÁªÂò¤µ¤ì¤Æ¤¤¤ë Timemap Æâ¤Ë¥¿¥¤¥ë¤¬ÀßÃÖ¤µ¤ì¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£(Scene¥Ó¥å¡¼ ¤¬¥Þ¥¹Ìܾõ¤Ë¤Ê¤ê¤Þ¤¹)
¡¡¥Ñ¥ì¥Ã¥ÈÆâ¤Ë¤¢¤ë Paint with active brush ¤Î¥¢¥¤¥³¥ó(º¸¤«¤é£³ÈÖÌÜ)¤ò²¡¤·¤Æ¤¯¤À¤µ¤¤¡£
¤³¤Î¥Ü¥¿¥ó¤¬ÁªÂò¤µ¤ì¤Æ¤¤¤ë¤È¡¢¥¿¥¤¥ë¤ò£±¤ÄÁª¤ó¤Ç¡¢Scene¥Ó¥å¡¼Æâ¤ËÁªÂò¤·¤Æ¤¤¤ë¥¿¥¤¥ë¤òÀßÃ֤Ǥ¤Þ¤¹¡£
£±¥¯¥ê¥Ã¥¯¤ÇÀßÃÖ¡¢¥É¥é¥Ã¥°¤·¤Æ¤¤¤ë´Ö¤Ï¤Ä¤Ê¤²¤ÆÀßÃ֤Ǥ¤Þ¤¹¡£
¥¿¥¤¥ëÀßÃÖ
![](https://image02.seesaawiki.jp/i/o/i-school-memo/x7ljCzAaT_.png)
¡¡
¡¡Erase with active brush ¤Î¥¢¥¤¥³¥ó(±¦¤«¤é£²ÈÖÌÜ)¤ò²¡¤¹¤³¤È¤Ç¡¢¾Ã¤·¥´¥àµ¡Ç½¤ËÀÚ¤êÂؤï¤ê¤Þ¤¹¡£
¤³¤ì¤â£±¥¯¥ê¥Ã¥¯¤Ç£±¤Ä¤Î¥¿¥¤¥ë¤òºï½ü¡¢¥É¥é¥Ã¥°¤·¤Æ¤¤¤ë´Ö¤Ï¤Þ¤È¤á¤Æºï½ü¤Ç¤¤Þ¤¹¡£
¥¿¥¤¥ëºï½ü
![](https://image02.seesaawiki.jp/i/o/i-school-memo/pWOHbG7TV9.png)
¼ê½çÆ°²è
Æ°²è¥Õ¥¡¥¤¥ë¤Ø¤Î¥ê¥ó¥¯
¡¡´ðËÜŪ¤Ë¤Ï¤³¤Î£²¤Ä¤Î¥¢¥¤¥³¥ó¤À¤±¤ÇÁàºî¤Ç¤¤Þ¤¹¡£¼«Í³¤Ë¥¿¥¤¥ë¤òÀßÃÖ¤·¤ÆÅɤê¤Ä¤Ö¤·¤Æ¤¯¤À¤µ¤¤¡£
Scene¥Ó¥å¡¼ Æâ¤ÎÇò¤¤ÏȤ¬¥«¥á¥é¤Î±Ç¤¹ÈϰϤˤʤê¤Þ¤¹¤Î¤Ç¡¢¥¥ã¥é¤¬°ÜÆ°¤¹¤ë¤³¤È¤ò¹Í¤¨¤Æ¡¢¤³¤Î¥«¥á¥é¤Î±Ç¤¹ÈϰϤè¤êÂ礤¯Åɤê¤Ä¤Ö¤·¤Æ¤ª¤¯¤è¤¦¤Ë¤·¤Æ¤¯¤À¤µ¤¤¡£
¡¡Â¾¤Î¥Ü¥¿¥ó¤Ë¤Ä¤¤¤Æ¤âÁàºî¤·¤Ê¤¬¤é³Ð¤¨¤Æ¤¤¤¯¤³¤È¤¬¤Ç¤¤Þ¤¹¤Î¤Ç¡¢¿§¡¹¤È»î¤·¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡£
²óž¤µ¤»¤¿¤ê¡¢¤Þ¤È¤á¤Æ°ÜÆ°¤µ¤»¤¿¤ê¤È¡¢Áàºî¤Ë¤Ê¤ì¤Æ¤¯¤ë¤È¿§¡¹¤Ê¤³¤È¤¬½ÐÍè¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£
»²¹Í¥µ¥¤¥È
Unity¸ø¼°¥Þ¥Ë¥å¥¢¥ë
Tile Pallete
https://docs.unity3d.com/ja/2018.4/Manual/Tilemap-...
¥³¥¬¥Í¥Ö¥í¥° ÍÍ
¡ÚUnity¡Û¥¿¥¤¥ë¥Þ¥Ã¥×¤Î´ðËÜŪ¤Ê»È¤¤Êý
https://baba-s.hatenablog.com/entry/2018/04/08/130...
Scene ¥Ó¥å¡¼²èÁü(»²¹Í)
![](https://image02.seesaawiki.jp/i/o/i-school-memo/sdiITyftJs.jpg)
¡¡¤¢¤ëÄøÅ٤ˤʤ俤鴰À®¤Ë¤·¤Æ¤¯¤À¤µ¤¤¡£¤¢¤È¤ÇÄɲäâ²Äǽ¤Ç¤¹¡£
¡¡Grid_Base ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤È¤ª¤Ê¤¸¤è¤¦¤Ë MainMap ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤È¤·¤Æ TileMap ¤òºîÀ®¤·¤Þ¤¹¡£
¡¡¥Ò¥¨¥é¥ë¥¡¼¾å¤Î MainMap ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÁªÂò¤·¤Æ±¦¥¯¥ê¥Ã¥¯¤ò¤·¤Æ¥á¥Ë¥å¡¼¤ò³«¤¡¢
2D Object => Tilemap ¤òÁªÂò¤·¤Æ¤¯¤À¤µ¤¤¡£MainMap ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤È¤·¤Æ
Grid ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¢¤½¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤È¤·¤Æ Tilemap ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬ºîÀ®¤µ¤ì¤Þ¤¹¡£
¡¡Ì¾Á°¤ò Grid_Walk ¤ËÊѹ¹¤·¤Æ¤¯¤À¤µ¤¤¡£
¥Ò¥¨¥é¥ë¥¡¼²èÁü
![](https://image02.seesaawiki.jp/i/o/i-school-memo/1zMfWgEN14.png)
¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
![](https://image02.seesaawiki.jp/i/o/i-school-memo/CpgL5KTsd8.png)
¡¡Tilemap ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÁªÂò¤·¤Æ¡¢Tilemap Renderer ¥³¥ó¥Ý¡¼¥Í¥ó¥ÈÆâ¤Ë¤¢¤ë
Additional Settings ¤Î Sorting Layer ¤ò Walk ¤ËÀßÄꤷ¤Æ¤¯¤À¤µ¤¤¡£
¤³¤ÎÀßÄê¤ò¹Ô¤¦¤³¤È¤Ë¤è¤ê¡¢Grid_Base ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ÇºîÀ®¤·¤¿¥¿¥¤¥ë·²¤è¤ê¤âÁ°Ì̤ˡ¢
¤³¤Á¤é¤Î¥¿¥¤¥ë·²¤¬É½¼¨¤µ¤ì¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£
¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
![](https://image02.seesaawiki.jp/i/o/i-school-memo/F1XFK6Q5iD.png)
¡¡¥¿¥¤¥ë¤ÎÀßÃÖÊýË¡¤ÏÀè¤Û¤É¤ÈƱ¤¸¤Ç¤¹¡£
¥Ò¥¨¥é¥ë¥¡¼¤Ç Grid_Walk ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥ÈÆâ¤Î Tilemap ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÁªÂò¤¹¤ë¤³¤È¤ò˺¤ì¤Ê¤¤¤Ç¤¯¤À¤µ¤¤¡£
´Ö°ã¤¨¤Æ Grid_Base ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥ÈÆâ¤Î Tilemap ¤À¤È¡¢¤½¤Á¤é¤¬¾å½ñ¤¤µ¤ì¤Æ¾Ã¤¨¤Æ¤·¤Þ¤¤¤Þ¤¹¡£
¡¡Base ¤Î¥¿¥¤¥ë¾å¤Ë½Å¤Í¤Æɽ¼¨¤·¤¿¤¤¥¿¥¤¥ë¤òÁªÂò¤·¤ÆÇÛÃÖ¤·¤Æ¤¤¤Ã¤Æ¤¯¤À¤µ¤¤¡£
¡¡Sorting Layer ¤ÎÀßÄ꤬¤µ¤ì¤Æ¤¤¤ì¤Ð¡¢¤Á¤ã¤ó¤ÈÉÁ²è¤ÎÍ¥Àè½ç°Ì¤¬¹â¤¯¤Ê¤ê¡¢½Å¤Ê¤Ã¤Æɽ¼¨¤µ¤ì¤Þ¤¹¡£
Scene ¥Ó¥å¡¼²èÁü(»²¹Í)
![](https://image01.seesaawiki.jp/i/o/i-school-memo/JTSqDK2gUK.jpg)
¡¡¤³¤Á¤é¤âºî¤ê¤³¤àɬÍפϤ¢¤ê¤Þ¤»¤ó¡£¤¢¤È¤ÇÊѹ¹¡¦ÄɲòÄǽ¤Ç¤¹¡£
¡¡Grid_Base ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤È¤ª¤Ê¤¸¤è¤¦¤Ë MainMap ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤È¤·¤Æ TileMap ¤òºîÀ®¤·¤Þ¤¹¡£
¡¡¥Ò¥¨¥é¥ë¥¡¼¾å¤Î MainMap ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÁªÂò¤·¤Æ±¦¥¯¥ê¥Ã¥¯¤ò¤·¤Æ¥á¥Ë¥å¡¼¤ò³«¤¡¢
2D Object => Tilemap ¤òÁªÂò¤·¤Æ¤¯¤À¤µ¤¤¡£MainMap ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤È¤·¤Æ
Grid ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¢¤½¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤È¤·¤Æ Tilemap ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬ºîÀ®¤µ¤ì¤Þ¤¹¡£
¡¡Ì¾Á°¤ò Grid_Collision ¤ËÊѹ¹¤·¤Æ¤¯¤À¤µ¤¤¡£
¥Ò¥¨¥é¥ë¥¡¼²èÁü
![](https://image01.seesaawiki.jp/i/o/i-school-memo/X3GKHYsfND.png)
¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
![](https://image01.seesaawiki.jp/i/o/i-school-memo/AXXhBGzovR.png)
¡¡Tilemap ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÁªÂò¤·¤Æ¡¢Tilemap Renderer ¥³¥ó¥Ý¡¼¥Í¥ó¥ÈÆâ¤Ë¤¢¤ë
Additional Settings ¤Î Sorting Layer ¤ò Collision ¤ËÀßÄꤷ¤Æ¤¯¤À¤µ¤¤¡£
¤³¤ÎÀßÄê¤ò¹Ô¤¦¤³¤È¤Ë¤è¤ê¡¢Grid_Base ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ÇºîÀ®¤·¤¿¥¿¥¤¥ë·²¤è¤ê¤âÁ°Ì̤ˡ¢
¤³¤Á¤é¤Î¥¿¥¤¥ë·²¤¬É½¼¨¤µ¤ì¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£
¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
![](https://image01.seesaawiki.jp/i/o/i-school-memo/X3fnPw25hk.png)
Scene ¥Ó¥å¡¼²èÁü
![](https://image02.seesaawiki.jp/i/o/i-school-memo/uuG0dQmZBe.jpg)
¡¡¤³¤Á¤é¤âƱÍͤˡ¢¤¢¤ëÄøÅ٤ǹ½¤¤¤Þ¤»¤ó¡£
¡¡°Ê¾å¤Ç Tilemap ¤Î´°À®¤Ç¤¹¡£
¡¡°Ê¾å¤Ç¤³¤Î¼ê½ç¤Ï½ªÎ»¤Ç¤¹¡£
¡¡¼¡¤Ï¡¡¼ê½ç£µ¡¡¡Ý¥×¥ì¥¤¥ä¡¼¥¥ã¥é¤ÎºîÀ®¡Ý¡¡¤Ç¤¹¡£
- ¥«¥Æ¥´¥ê¡§
- ¿Ê³Ø/¥¹¥¯¡¼¥ë
- ¥×¥í¥°¥é¥ß¥ó¥°
¥³¥á¥ó¥È¤ò¤«¤¯