ºÇ½ª¹¹¿·¡§ orika_ex_miyako 2023ǯ07·î01Æü(ÅÚ) 13:42:51ÍúÎò
Unity ¤Î¥Ð¡¼¥¸¥ç¥ó¤¬ 2022.2 °Ê¹ß¤«¡¢2022.1 °ÊÁ°¤Ë¤è¤ê¡¢¼ÂÁõ¤Î¼ê½ç¤¬°Û¤Ê¤ê¤Þ¤¹¡£
¡ã¼ÂÁõ²èÁü¡¡Bake ¤µ¤ì¤¿·ÐÏ©¾ðÊó(Àî¤ä»³¤Ï°ÜÆ°ÉԲĤΥ¿¥¤¥ë¤È¤·¤ÆÀßÄꤵ¤ì¤Æ¤¤¤ë)¡ä
¡¡°Ê²¼¤ÎÆâÍƤǽçÈ֤˼ÂÁõ¤ò¿Ê¤á¤Æ¤¤¤¤Þ¤¹¡£
¼ê½ç£¶¡¡¡ÝNavMeshComponents ¤Î¥¤¥ó¥Ý¡¼¥È¤È Bake ½èÍý¡Ý
¡¡£¹¡¥NavMeshComponents ¤Î¥¤¥ó¥Ý¡¼¥È £±£°¡¥¥¿¥¤¥ë¥Þ¥Ã¥×¤ò Bake ¤·¤Æ°ÜÆ°·ÐÏ©¤òºîÀ®¤¹¤ë
¡¡¿·¤·¤¤³Ø½¬ÆâÍƤϡ¢°Ê²¼¤ÎÄ̤ê¤Ç¤¹¡£
¡¡¡¦NavMeshComponents ¥Ñ¥Ã¥±¡¼¥¸ ¡¡¡¦¥¿¥¤¥ë¥Þ¥Ã¥×¤Î Bake ½èÍý
¡¡¥¿¥¤¥ë¥Þ¥Ã¥×¤ÇÀ½ºî¤·¤¿¥¹¥Æ¡¼¥¸¡¢¤ª¤è¤Ó¡¢¥¥ã¥é¤ÎºîÀ®¤¬½ªÎ»¤·¤Þ¤·¤¿¤Î¤Ç¡¢¼¡¤Ï¡¢¥¥ã¥é¤ò¥¿¥Ã¥×¤·¤¿ÃÏÅÀ¤Ë¸þ¤±¤Æ°ÜÆ°¤µ¤»¤ëµ¡Ç½¤ò¼ÂÁõ¤·¤Þ¤¹¡£
¤½¤Î¤¿¤á¤Ë¤Ï¡¢¥¿¥Ã¥×¤·¤¿ÃÏÅÀ¤¬°ÜÆ°²Äǽ¤ÊÈϰϤǤ¢¤ë¤Î¤«¤òÀßÄꤷ¤Æ¤ª¤¯É¬Íפ¬¤¢¤ê¤Þ¤¹¡£
¡¡¤³¤Îµ¡Ç½¤Ï Unity ¤¬ÍÑ°Õ¤·¤Æ¤¤¤ë 2D ÍѤΠNavMeshAgent ¤Îµ¡Ç½¤Ç¤¢¤ë¡¡NavMeshComponents ¤òÍøÍѤ·¤Æ¡¢»öÁ°¤Ë·ÐÏ©¤È¤Ê¤ë°ÜÆ°ÈϰϤòÀßÄꤷ¤Æ¤ª¤¡¢
¤½¤Î°ÜÆ°ÈÏ°ÏÆâ¤Ç¤¢¤ì¤Ð°ÜÆ°¤ò¹Ô¤¦¡¢¤È¤¤¤¦·Á¤Ç¼ÂÁõ¤·¤Æ¤¤Þ¤¹¡£°ÜÆ°²Äǽ¤ÊÈϰϤˤϴä¤äÀî¤È¤¤¤Ã¤¿¡¢°ÜÆ°¤Ç¤¤Ê¤¤¥¿¥¤¥ë¤Ï¾Ê¤«¤ì¤ë¤è¤¦¤ËÀßÄꤷ¤Æ¤ª¤¯¤³¤È¤Ç¡¢
¥¿¥Ã¥×¤·¤¿ÃÏÅÀ¤Ë¸þ¤«¤Ã¤Æ¡¢ºÇûµ÷Î¥¡¢¤«¤Ä¡¢°ÜÆ°¤Ç¤¤Ê¤¤¥¿¥¤¥ë¤ÏÈò¤±¤Æ°ÜÆ°¤·¤Æ¤¤¤¯½èÍý¤ò¼ÂÁõ¤¹¤ë¤³¤È¤¬½ÐÍè¤Þ¤¹¡£
¡¡¥¿¥Ã¥×½èÍý¤Ï¼¡¤Î¼ê½ç¤È¤·¡¢¤³¤Î¼ê½ç¤Ç¤Ï¡¢NavMeshComponents ¤Î¥¤¥ó¥Ý¡¼¥È¡¢¤ª¤è¤Ó¡¢°ÜÆ°²Äǽ¤ÊÈϰϤÎÀßÄê¤ò¹Ô¤¤¤Þ¤¹¡£
¡¡¤Ê¤ª¡¢NavMeshComponents ¤Ç¤Ï¥¿¥¤¥ë¥Þ¥Ã¥×¤Ë¸Â¤é¤º¡¢2D ¥²¡¼¥à¤Ë¤ª¤¤¤Æ NavMeshAgent ¤Îµ¡Ç½¤òÍøÍѤ·¤¿·ÐÏ©°ÜÆ°¤Î½èÍý¤ò¼ÂÁõ¤¹¤ë¤³¤È¤¬½ÐÍè¤Þ¤¹¡£
¡¡
¡¡¡¡=>¡¡¸½ºß(2023.7·î)¤ÏÀµ¼°¥ê¥ê¡¼¥¹¤µ¤ì¤Æ¤¤¤Þ¤¹¡£
¡¡¡¡¡¡¡¡¤½¤Î¤¿¤á¡¢Unity 2022.2 °Ê¹ß¤Î¥Ð¡¼¥¸¥ç¥ó¤ò¤ª»È¤¤¤Î¾ì¹ç¡¢¤³¤Î¼ê½ç¤ÏÉÔÍפǤ¹¡£
¡¡¡¡¡¡¡¡Unity 2022.1 °ÊÁ°¤Î¥Ð¡¼¥¸¥ç¥ó¤ò¤ª»È¤¤¤Î¾ì¹ç¡¢Â³¤±¤Æ¥¤¥ó¥Ý¡¼¥È¤ò¹Ô¤Ã¤Æ¤¯¤À¤µ¤¤¡£
¡¡¥¤¥ó¥Ý¡¼¥È¤¹¤ë¾ì¹ç¤Î¼ê½ç¤ò¤Þ¤È¤á¤Þ¤¹¡£
¡¡master ¥Ö¥é¥ó¥Á¤Ç¤Ï¤Ê¤¯¡¢2D ÍѤΥ֥é¥ó¥Á¤«¤é¥À¥¦¥ó¥í¡¼¥É¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¤Î¤Ç¡¢
2019.3-2D ¥Ö¥é¥ó¥Á¤«¤é¥À¥¦¥ó¥í¡¼¥É¤ò¹Ô¤¤¤Þ¤¹¡£
¡ãNavMeshComponents 2DÍÑ¡ä
https://github.com/Unity-Technologies/NavMeshCompo...
¡¡Github ¥µ¥¤¥ÈÆâ¤Î Code ¥Ü¥¿¥ó¤ò²¡¤·¤Æ¡¢Download Zip ¤òÁªÂò¤·¤Æ¤¯¤À¤µ¤¤¡£
°µ½Ì¤µ¤ì¤¿¾õÂ֤ǡÖNavMeshComponents-2019.3-2D.zip¡×¥Ñ¥Ã¥±¡¼¥¸¤¬¥À¥¦¥ó¥í¡¼¥É¤Ç¤¤Þ¤¹¤Î¤Ç¡¢¤½¤Á¤é¤òŸ³«¤·¤Þ¤¹¡£
¤½¤Î¸å¡¢Å¸³«¤·¤¿¥Õ¥©¥ë¥ÀÆâ¤ò NavMeshComponents-2019.3-2D/Assets ¤È³«¤¤¤Æ¤¤¤¡¢¡ÖNavMeshComponents¡×¤Î¥Õ¥©¥ë¥À¤òÁªÂò¤·¤Þ¤¹¡£
¡ãNavMeshComponents-2019.3-2D/Assets/NavMeshComponents¥Õ¥©¥ë¥À¡ä
¡¡¤³¤Î¡ÖNavMeshComponents¡×¤Î¥Õ¥©¥ë¥À¤ò Unity Æâ¤Î Project ¥Õ¥©¥ë¥À¤Ë¥É¥é¥Ã¥°¥¢¥ó¥É¥É¥í¥Ã¥×¤·¤Æ Unity ¤Ø¥¤¥ó¥Ý¡¼¥È¤·¤Þ¤¹¡£
¥¤¥ó¥Ý¡¼¥È¸å¤Î Unity ¤Î Project/Assets ¥Õ¥©¥ë¥À²èÁü
¡¡°Ê¾å¤Ç¥¤¥ó¥Ý¡¼¥È¤Ï´°Î»¤Ç¤¹¡£
¡¡Tilemap ¤ËÍÑ°Õ¤µ¤ì¤Æ¤¤¤ë Tilemap Collider2D ¥³¥ó¥Ý¡¼¥Í¥ó¥È¡¢
¤ª¤è¤Ó NavMeshComponents ¥Õ¥©¥ë¥ÀÆâ¤Ë¤¢¤ë NavMeshBuilder2D ¤È NavMeshSourceTag2D ¤È¤¤¤¦£²¤Ä¤Î¥¯¥é¥¹¤ò»È¤Ã¤Æ¡¢¼ÂºÝ¤Ë¤Ï·ÐÏ©°ÜÆ°¤Î½èÍý¤¬¼ÂÁõ¤µ¤ì¤Þ¤¹¡£
¡¡¤½¤Î¤¿¤á¤Ë¤Ï¡¢3D ¤Î NavMeshAgent ¤ÈƱ¤¸¤è¤¦¤Ë¡¢¥¿¥¤¥ë¥Þ¥Ã¥×¾å¤Ë AI ¤Ç¸¡ÃβÄǽ¤Ê·ÐÏ©¤òÀßÄꤷ¤Æ Bake ¤ò¹Ô¤¦É¬Íפ¬¤¢¤ê¤Þ¤¹¡£
¡¡¤Ç¤¹¤¬¸½ºß¤Ï¤Þ¤À¡¢Bake ¤ò¹Ô¤¦Âоݤ¬»ØÄꤵ¤ì¤Æ¤¤¤Þ¤»¤ó¡£
¡¡¤½¤³¤Ç Bake ½èÍý¤ò¹Ô¤¦Á°¤Ë¡¢¤Þ¤º¤Ï°ÜÆ°²Äǽ¤Ê¥¿¥¤¥ë¥Þ¥Ã¥×¤Î¾ðÊó¤ò²èÁü¦¤òÀßÄꤷ¤Þ¤¹¡£
¡¡°ÜÆ°²Äǽ¤Ê¥¿¥¤¥ë¤Ç¤¹¤¬¡¢¥¿¥¤¥ë¤Î Collider Type ¤¬ Grid¡¢¤¢¤ë¤¤¤Ï Sprite ¤Ë¤Ê¤Ã¤Æ¤¤¤ë¾ì¹ç¤Î¤ßÀßÄê²Äǽ¤Ç¤¹¡£
None ¤Ë¤·¤Æ¤·¤Þ¤¦¤È¡¢°ÜÆ°²Äǽ¡¦ÉÔ²Äǽ¤Î¤¤¤º¤ì¤Ë¤â³ºÅö¤»¤º¡¢Bake ¤¬½ÐÍè¤Þ¤»¤ó¡£
¡¡Collider Type ¤ò Grid ¤ËÀßÄꤷ¤Æ¤¤¤ë¾ì¹ç¡¢¥¿¥¤¥ëÁ´ÂΤ¬°ÜÆ°²Äǽ¡¢¤¢¤ë¤¤¤Ï°ÜÆ°ÉÔ²Äǽ¤Î·Á¾õ¤Î¥³¥é¥¤¥À¡¼¤ò»ý¤Ä¥¿¥¤¥ë¤Ë¤Ê¤ê¤Þ¤¹¡£
¡¡Sprite ¤ËÀßÄꤷ¤Æ¤¤¤ë¾ì¹ç¡¢¥¿¥¤¥ë¤Î²èÁüÉôʬ¤Î¤ß¤¬°ÜÆ°²Äǽ¡¢¤¢¤ë¤¤¤Ï°ÜÆ°ÉÔ²Äǽ¤Ê·Á¾õ¤Î¥³¥é¥¤¥À¡¼¤ò»ý¤Ä¥¿¥¤¥ë¤Ë¤Ê¤ê¤Þ¤¹¡£
¡¡¥¿¥¤¥ë¤Î Collider Type ¤Ï¥¿¥¤¥ë¤òÁªÂò»þ¡¢¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤è¤ê³Îǧ¤Ç¤¤Þ¤¹¡£
¡ã¥¿¥¤¥ë¤Î Collider Type¡ä
¡¡¤ï¤«¤ê¤ä¤¹¤¯¡¢°ÜÆ°ÉÔ²Äǽ¤Ê¾ì¹ç¤Î¥¿¥¤¥ë¤ò²èÁü¤ÇÈæ³Ó¤·¤Æ¤ª¤¤Þ¤¹¡£
¡ãGrid ¤Î¾ì¹ç¡ä
¡ãSprite ¤Î¾ì¹ç¡ä
¡¡Grid ¤ÎÊý¤Ï¥¿¥¤¥ë¤½¤Î¤â¤Î¤¬°ÜÆ°ÉԲĤηÁ¾õ¤È¤Ê¤Ã¤Æ¤ª¤ê¡¢Sprite ¤ÎÊý¤Ï¤½¤ì¤è¤ê¤â¾®¤µ¤¯¥¿¥¤¥ëÆâ¤Î²èÁü¤Ë±è¤Ã¤¿·Á¾õ¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£
Æä˷Á¾õ¤òµ¤¤Ë¤·¤Ê¤¤¤Î¤Ç¤¢¤ì¤Ð Grid¡¢²èÁü¤Ë±è¤Ã¤¿·Á¾õ¤Ë¤·¤¿¤¤¾ì¹ç¤Ë¤Ï Sprite ¤Ç¹Í¤¨¤ë¤è¤¦¤Ë¤·¤Þ¤¹¡£
¡¡¤Þ¤¿ Sprite ¤Î¾ì¹ç¡¢²èÁü¤ÎÄ̤ê¤Ë¥³¥é¥¤¥À¡¼¤¬·ÁÀ®¤µ¤ì¤Ê¤¤¾ì¹ç¤Î¤¢¤ê¤Þ¤¹¡£
¤½¤ÎºÝ¤Ë¤Ï¡¢²¼µ¤Î¼ê½ç¤Ë¤è¤ê¡¢¥¿¥¤¥ë¤Ç¤Ï¤Ê¤¯¡¢¥¿¥¤¥ë¤Î¸µ¤Ë¤Ê¤Ã¤Æ¤¤¤ë²èÁü¦¤ÇÀßÄê¤ò¹Ô¤Ã¤Æ¤¯¤À¤µ¤¤¡£
¡¡¥¿¥¤¥ë¤Î¸µ¤È¤Ê¤Ã¤Æ¤¤¤ë¥¿¥¤¥ëÍѤβèÁü¤Î¥Õ¥¡¥¤¥ë¤òÁªÂò¤·¡¢¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤«¤é Sprite Editor ¤òµ¯Æ°¤·¤Þ¤¹¡£
Sprite Mode ¤¬ Multiple ¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤³¤È¤ò³Îǧ¤·¤Æ¤¯¤À¤µ¤¤¡£
¡¡Sprite Editor ¤¬µ¯Æ°¤·¤¿¤é¡¢º¸¾å¤Î¥á¥Ë¥å¡¼¤è¤ê¡¢Custom Physics Shape ¤òÁªÂò¤·¤Þ¤¹¡£
¡ãCustom Physics Shape ¤òÁªÂò¡ä
¡¡Custom Physics Shape ¤òÁªÂò¤·¤¿¾õÂ֤ǡ¢Ê¬³ä¤µ¤ì¤Æ¤¤¤ë£±¤Ä¤Î²èÁüÆâ¤ò¥É¥é¥Ã¥°¥¢¥ó¥É¥É¥í¥Ã¥×¤·¤ÆÏȤòÉÁ¤¯¤è¤¦¤Ë¤¹¤ë¤È¡¢Çò¤¤¥³¥é¥¤¥À¡¼ÍѤÎÏȤ¬½Ð¸½¤·¤Þ¤¹¡£
¡¡¤³¤ÎÇò¤¤¥³¥é¥¤¥À¡¼¤ÎÏȤ¬¡¢·ÐÏ©¤È¤·¤Æ Bake ÂоݤȤʤ롢°ÜÆ°²Äǽ¤ÊÈϰϤȤʤê¤Þ¤¹¡£(Ä̾ï¤Î¥³¥é¥¤¥À¡¼¤È¤Ï¹Í¤¨Êý¤¬µÕ¤Ë¤Ê¤ê¤Þ¤¹)
³Æ³Ñ¤ò¥É¥é¥Ã¥°¥¢¥ó¥É¥É¥í¥Ã¥×¤¹¤ë¤ÈÈϰϤÎÊѹ¹¤¬¤Ç¤¤Þ¤¹¤Î¤Ç¡¢¤³¤Á¤é¤ò³Æ²èÁü¤ÎºÇÂçÃͤޤǰú¤¿¤Ð¤·¤ÆÀßÄꤷ¤Þ¤¹¡£
(¤¿¤À¤·¡¢Unity 2022.2 °Ê¹ß¤Ï¥µ¥¤¥º¤ÎºÆÄ´À°¤¬½ÐÍè¤Þ¤»¤ó¤Î¤Ç¡¢²¿²ó¤«¤Ë¤ï¤±¤ÆºîÀ®¤·¤Æ¤¯¤À¤µ¤¤)
¡¡¤½¤¦¤¹¤ë¤³¤È¤Ë¤è¤ê¡¢¤³¤Î²èÁü¤Ï¤¹¤Ù¤Æ¤Î°ÌÃÖ¤ÇÄ̲á²Äǽ¤Ê²èÁü¤È¤·¤ÆÀßÄꤵ¤ì¤Þ¤¹¡£
¡ã¼ê½çÆ°²è¡¡Çò¤¤¥³¥é¥¤¥À¡¼¤ÎÁàºî¡ä
Æ°²è¥Õ¥¡¥¤¥ë¤Ø¤Î¥ê¥ó¥¯
¡ãÇò¤¤¥³¥é¥¤¥À¡¼ÀßÄê¸å¤Î²èÁü¡ä
¡ã¼ê½çÆ°²è¡¡°ÜÆ°²Äǽ¤Ë¤¹¤ë¡¢¤¹¤Ù¤Æ¤Î²èÁü¤ËÇò¤¤¥³¥é¥¤¥À¡¼¤òÀßÄꤹ¤ë¡ä
Æ°²è¥Õ¥¡¥¤¥ë¤Ø¤Î¥ê¥ó¥¯
¡¡ÀßÄ꤬½ªÎ»¤·¤¿¤é¡¢±¦¾å¤Î Apply ¤ò²¡¤·¤ÆÊݸ¤·¤Þ¤¹¡£
¡¡¤³¤Î¼ê½ç¤ò¡¢°ÜÆ°²Äǽ¤È¤µ¤»¤¿¤¤³Æ²èÁü¤ËÂФ·¤Æ¡¢¤½¤ì¤¾¤ìÀßÄê¤ò¹Ô¤Ã¤Æ¤¯¤À¤µ¤¤¡£
¡¡°ÜÆ°²Äǽ¤È¤Ê¤ë·ÐÏ©¤Î¾ðÊó¤òÀßÄꤹ¤ë¤¿¤á¡¢Grid_Move ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤Ç¤¢¤ë Tilemap ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÁªÂò¤·¤Þ¤¹¡£
¡¡ºÇ½é¤Ë¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤Î±¦¾å¤Ë¤¢¤ë static ¤Ë¥Á¥§¥Ã¥¯¤òÆþ¤ì¤Þ¤¹¡£
NavMesh ¤Î¾ðÊó¤ò Bake ¤¹¤ë¤¿¤á¤Ë¤Ï¡¢¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬ static ¤ËÀßÄꤵ¤ì¤Æ¤¤¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
¡¡¼¡¤Ë¡¢Add Component ¥Ü¥¿¥ó¤«¤é¡¢TilemapCollider2D ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤È NavMeshSourceTag2D ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤ò¥¢¥¿¥Ã¥Á¤·¤Þ¤¹¡£
ÄɲäÎÀßÄê¤ÏÉÔÍפǤ¹¤Î¤Ç¡¢¥¢¥¿¥Ã¥Á¤µ¤ì¤Æ¤¤¤ë¤³¤È¤ò³Îǧ¤·¤Æ¤ª¤¤¤Æ¤¯¤À¤µ¤¤¡£
Grid_Move ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤Ç¤¢¤ë Tilemap ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
¡¡°Ê¾å¤ÇÀßÄê¤Ï´°Î»¤Ç¤¹¡£
¡¡¼ÂºÝ¤Ë Bake ¤ò¹Ô¤¦¤¿¤á¤Îµ¡Ç½¤ò¼ÂÁõ¤·¤Þ¤¹¡£
¡¡¥Ò¥¨¥é¥ë¥¡¼¤Î¶õ¤¤¤Æ¤¤¤ë¾ì½ê¤Ç±¦¥¯¥ê¥Ã¥¯¤ò¤·¤Æ¥á¥Ë¥å¡¼¤ò³«¤¡¢Create Empty ¤òÁªÂò¤·¤Þ¤¹¡£(¤¢¤ë¤¤¤Ï ctrl + shift + N ¤Ç¥·¥ç¡¼¥È¥«¥Ã¥È¥¡¼Áàºî¤·¤Þ¤¹)
¿·¤·¤¤¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬ºîÀ®¤µ¤ì¤Þ¤¹¤Î¤Ç¡¢Ì¾Á°¤ò NavMeshBuilder ¤ËÊѹ¹¤·¤Þ¤¹¡£
¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤ÎºÇ²¼Ãʤè¤ê Add Component ¤òÁªÂò¤·¤Æ¡¢NavMeshBuilder2D ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤ò¥¢¥¿¥Ã¥Á¤·¤Þ¤¹¡£
NavMeshBuilder ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
¡¡
¡¡ÄɲäÎÀßÄê¤ÏÉÔÍפǤ¹¡£°Ê¾å¤Ç¤³¤Î¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ï´°À®¤Ç¤¹¡£
¡¡NavMeshBuilder ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥ÈÆâ¤Î NavMeshBuilder2D ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Ë¤¢¤ë Bake ¥Ü¥¿¥ó¤ò²¡¤·¤Æ¡¢Bake ¤ò¹Ô¤¤¤Þ¤¹¡£
Bake ¤·¤¿¾ðÊó¤Ï¡¢Navigation ¥¦¥¤¥ó¥É¥¦¤òÁªÂò¤·¤Æ¤¤¤ë¤³¤È¤Ç²Ä»ë²½²Äǽ¤Ë¤Ê¤ê¤Þ¤¹¡£
¡¡Unity ¤Îº¸¾å¤Î¥á¥Ë¥å¡¼¤ÎÃ椫¤é Window > AI > Navigation ¤òÁªÂò¤·¤Æ¤¯¤À¤µ¤¤¡£Navigation ¥¦¥¤¥ó¥É¥¦¤¬³«¤¯¤«¡¢¥¤¥ó¥¹¥Ú¥¯¥¿¡¼Æâ¤Ë Navigation ¥¿¥Ö¤¬Äɲ䵤ì¤Þ¤¹¡£
¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤Î¥¿¥Ö¤ò Navigation ¥¿¥Ö¤ËÀÚ¤êÂؤ¨¤Æ¤¯¤À¤µ¤¤¡£Scene ¥Ó¥å¡¼Æâ¤Ë·ÐÏ©¤¬É½¼¨¤µ¤ì¤ì¤Ð¡¢Bake À®¸ù¤Ç¤¹¡£
(Unity 2022.2 °Ê¹ß¤Ï¡¢³ºÅö¤¹¤ë¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÁªÂò¤¹¤ë¤³¤È¤Ç¡¢Scene ¥Ó¥å¡¼Æâ¤Ë·ÐÏ©¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£¥¿¥Ö¤ÎÀÚ¤êÂؤ¨¤ÏÉÔÍפˤʤê¤Þ¤·¤¿¡£)
¥¿¥Ö¤ò Navigation ¤ËÀÚ¤êÂؤ¨¤ë
Bake ¤·¤¿ºÝ¤Î Scene ¥Ó¥å¡¼²èÁü
¡¡Àè¤Û¤É¤Î¼ê½ç¤ÇÀßÄꤷ¤¿²èÁü¤Î¾å¤¬°ÜÆ°²Äǽ¤ÊÈϰϤȤ·¤Æ Bake ¤µ¤ì¤Æ¤¤¤ë¤«³Îǧ¤·¤Þ¤¹¡£
¡¡
¡¡Àµ¾ï¤Ë Bake ¤µ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ë¤Ï¡¢²èÁü¤ÎÀßÄê¤ò¸«Ä¾¤·¤Æ¤¯¤À¤µ¤¤¡£
¡¡Bake ¤ËÌäÂ꤬¤Ê¤±¤ì¤Ð¡¢NavMeshBuilder2D ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Ë¤¢¤ë Bake On Eneble ¤Ë¥Á¥§¥Ã¥¯¤ò¤¤¤ì¤Æ¤¯¤À¤µ¤¤¡£
¤³¤Î¥Á¥§¥Ã¥¯¤òÆþ¤ì¤ë¤³¤È¤Ë¤è¤ê¡¢Bake ¤·¤¿·ÐÏ©¾ðÊ󤬥»¡¼¥Ö¤µ¤ì¤Þ¤¹¡£
¡¡
¡¡
¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
¡¡°Ê¾å¤ÇÀßÄê¤Ï´°Î»¤Ç¤¹¡£
¡¡É¬Íפ˱þ¤¸¤Æ¡¢°ÜÆ°ÈϰϤÎÄ´À°¤ò¹Ô¤¤¤Þ¤¹¡£
¡¡Bake ¤µ¤ì¤¿·ÐÏ©¤ÇÌäÂê¤Ê¤±¤ì¤Ð¡¢¤³¤Î¼ê½ç¤ÏÉÔÍפǤ¹¡£
¡¡½é´üÃÍ¤Ç Bake ¤ò¹Ô¤¦¤È¡¢ÁÛÄꤷ¤Æ¤¤¤ë¤è¤ê¤â¡¢¥¿¥¤¥ë¥Þ¥Ã¥×¤«¤éÎ¥¤ì¤¿°ÌÃ֤ǤΠBake ¤Ë¤Ê¤ë¾ì¹ç¤¬¤¢¤ê¤Þ¤¹¡£
¤³¤ì¤Ï¡¢Bake ¤ò¹Ô¤¦ºÝ¤Î Agents ¤ÎÀßÄê¤Ë¤è¤ë¤â¤Î¤Ç¤¹¡£
¡¡Navigation ¥¦¥¤¥ó¥É¥¦Æâ¤Ë Agents ¥¿¥Ö¤¬¤¢¤ê¤Þ¤¹¤Î¤Ç¡¢¤³¤Á¤é¤Î Radius ¤ÎÃͤò¾®¤µ¤¤Ãͤˤ·¤Æ¤¤¤¯¤³¤È¤Ç¡¢
°ÜÆ°ÉÔ²Äǽ¤Ê¥¿¥¤¥ë¥Þ¥Ã¥×¤Ë¤Ê¤ë¤Ù¤¯¶á¤¤°ÌÃ֤ޤǿ¯Æþ¤·¤Æ°ÜÆ°¤¹¤ë¤³¤È¤¬²Äǽ¤Ë¤Ê¤ê¤Þ¤¹¡£
Navigation ¥¦¥¤¥ó¥É¥¦/ Agents ¥¿¥Ö¡¡²èÁü
¡¡Bake ¤Ï²¿²ó¤Ç¤â¹Ô¤¨¤Þ¤¹¤Î¤Ç¡¢¤³¤Á¤é¤ÎÀßÄê¤òÊѹ¹¤·¤Æ Bake ¤ò¤ä¤êľ¤·¤Æ¡¢ÁÛÄꤷ¤Æ¤¤¤ë°ÜÆ°ÈϰϤˤʤë¤è¤¦¤ËÄ´À°¤ò¹Ô¤Ã¤Æ¤¯¤À¤µ¤¤¡£
¡¡°Ê¾å¤Ç¤³¤Î¼ê½ç¤Ï½ªÎ»¤Ç¤¹¡£
¡¡¼¡¤Ï¡¡¼ê½ç£·¡¡¡Ý¥¿¥¤¥ë¤Î¥¿¥Ã¥×´¶ÃÎÀ©¸æ¤Î¼ÂÁõ¡Ý¡¡¤Ç¤¹¡£
- ¥«¥Æ¥´¥ê¡§
- ¿Ê³Ø/¥¹¥¯¡¼¥ë
- ¥×¥í¥°¥é¥ß¥ó¥°
¥³¥á¥ó¥È¤ò¤«¤¯