ºÇ½ª¹¹¿·¡§ orika_ex_miyako 2024ǯ03·î31Æü(Æü) 09:56:44ÍúÎò
»öÁ°½àÈ÷¤È¤·¤Æ¡¢¥¿¥¤¥ë¥Þ¥Ã¥×¤ÇÀ½ºî¤·¤¿¥¹¥Æ¡¼¥¸¤òÍÑ°Õ¤·¤Æ¤ª¤¤¤Æ¤¯¤À¤µ¤¤¡£
Unity ¤Î¥Ð¡¼¥¸¥ç¥ó¤¬ 2022.2 °Ê¹ß¤«¡¢2022.1 °ÊÁ°¤Ë¤è¤ê¡¢¼ÂÁõ¤Î¼ê½ç¤¬°Û¤Ê¤ê¤Þ¤¹¡£
¡¡²¼µ¤Ï£²²óʬ¤Î´°À®»þ¤Î¤â¤Î¤Ç¤¹¡£
¡ã¼ÂÁõ²èÁü¡¡Bake Á°¤Î¾õÂÖ¡ä
¡ã¼ÂÁõ²èÁü¡¡Bake ¤µ¤ì¤¿·ÐÏ©¾ðÊó(¿å¿§¤Ë¤Ê¤Ã¤Æ¤¤¤ëÉôʬ¤¬ Bake ¤µ¤ì¤Æ¤¤¤ë)¡ä
¡ã¼ÂÁõÆ°²è¡¡Bake ¤µ¤ì¤¿·ÐÏ©¾ðÊó(·ê¡¦ÊÉ¡¦²È¶ñ¤Ï°ÜÆ°ÉԲĤΥ¿¥¤¥ë¤È¤·¤ÆÀßÄꤵ¤ì¤Æ¤¤¤ë)¡ä
Æ°²è¥Õ¥¡¥¤¥ë¤Ø¤Î¥ê¥ó¥¯
¡¡°Ê²¼¤ÎÆâÍƤǽçÈ֤˼ÂÁõ¤ò¿Ê¤á¤Æ¤¤¤¤Þ¤¹¡£
¡¡£±¡¥NavMeshComponents ¤Î¥¤¥ó¥Ý¡¼¥È ¡¡£²¡¥¥¿¥¤¥ë¥Þ¥Ã¥×¤ò Bake ¤·¤Æ°ÜÆ°²Äǽ¤ÊÈϰϤòºîÀ®¤¹¤ë
¡¡¿·¤·¤¤³Ø½¬ÆâÍƤϡ¢°Ê²¼¤ÎÄ̤ê¤Ç¤¹¡£
¡¡¡¦NavMeshComponents ¥Ñ¥Ã¥±¡¼¥¸ ¡¡¡¦¥¿¥¤¥ë¥Þ¥Ã¥×¤Î Bake ½èÍý
¡¡¤³¤Îµ¡Ç½¤Ï Unity ¤¬ÍÑ°Õ¤·¤Æ¤¤¤ë 2D ÍѤΠNavMeshAgent ¤Îµ¡Ç½¤Ç¤¢¤ë¡¡NavMeshComponents ¤òÍøÍѤ·¤Æ¡¢»öÁ°¤Ë·ÐÏ©¤È¤Ê¤ë°ÜÆ°ÈϰϤòÀßÄꤷ¤Æ¤ª¤¡¢
¤½¤Î°ÜÆ°ÈÏ°ÏÆâ¤Ç¤¢¤ì¤Ð°ÜÆ°¤ò¹Ô¤¦¡¢¤È¤¤¤¦·Á¤Ç¼ÂÁõ¤·¤Æ¤¤Þ¤¹¡£°ÜÆ°²Äǽ¤ÊÈϰϤˤϴä¤äÀî¤È¤¤¤Ã¤¿¡¢°ÜÆ°¤Ç¤¤Ê¤¤¥¿¥¤¥ë¤Ï¾Ê¤«¤ì¤ë¤è¤¦¤ËÀßÄꤷ¤Æ¤ª¤¯¤³¤È¤Ç¡¢
¥¿¥Ã¥×¤·¤¿ÃÏÅÀ¤Ë¸þ¤«¤Ã¤Æ¡¢ºÇûµ÷Î¥¡¢¤«¤Ä¡¢°ÜÆ°¤Ç¤¤Ê¤¤¥¿¥¤¥ë¤ÏÈò¤±¤Æ°ÜÆ°¤·¤Æ¤¤¤¯½èÍý¤ò¼ÂÁõ¤¹¤ë¤³¤È¤¬½ÐÍè¤Þ¤¹¡£
¡¡¥¿¥Ã¥×½èÍý¤Ï¼¡¤Î¼ê½ç¤È¤·¡¢¤³¤Î¼ê½ç¤Ç¤Ï¡¢NavMeshComponents ¤Î¥¤¥ó¥Ý¡¼¥È¡¢¤ª¤è¤Ó¡¢°ÜÆ°²Äǽ¤ÊÈϰϤÎÀßÄê¤ò¹Ô¤¤¤Þ¤¹¡£
¡¡¤Ê¤ª¡¢NavMeshComponents ¤Ç¤Ï¥¿¥¤¥ë¥Þ¥Ã¥×¤Ë¸Â¤é¤º¡¢2D ¥²¡¼¥à¤Ë¤ª¤¤¤Æ NavMeshAgent ¤Îµ¡Ç½¤òÍøÍѤ·¤¿·ÐÏ©°ÜÆ°¤Î½èÍý¤ò¼ÂÁõ¤¹¤ë¤³¤È¤¬½ÐÍè¤Þ¤¹¡£
¡¡2022.1 °ÊÁ°¤Î Unity ¤Ç¤ÏºÇ½é¤«¤é NavMesh ¤Î¥Ñ¥Ã¥±¡¼¥¸¤¬¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤Þ¤¹¤¬¡¢
2022.2 °Ê¹ß¤Î Unity ¤Ç¤Ï PackageManager ¤«¤é¼êÆ°¤Ç NavMesh ¤ò¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ëÊý¼°¤Ë¤Ê¤ê¤Þ¤·¤¿¡£
Unity 2022.2 °Ê¹ß
¡¡¤½¤Î¤¿¤á¡¢2022.2 °Ê¹ß¤Î Unity ¤Î¾ì¹ç¤Î¤ß¡¢PackageManager ¤«¤é AI Navigation ¤òÁªÂò¤·¤Æ¡¢¥¤¥ó¥¹¥È¡¼¥ë¤ò¹Ô¤¤¤Þ¤¹¡£
Packages ¤ÏUnity Registry ¤òÁªÂò¤·¤Æ¤¯¤À¤µ¤¤¡£
¡¡Íýͳ¤Ï¡¢£²£ÄÍѤΠNavMesh ¤â¡¢AI Navigation ¤Îµ¡Ç½¤ò³èÍѤ·¤ÆÆ°ºî¤¹¤ë¤¿¤á¤Ç¤¹¡£
¡¡Â³¤¤¤Æ²¼µ¤Î Unity ¤Î NavMesh ´ØÏ¢¤Î¥ê¥Ý¥¸¥È¥ê¤«¤é£²£ÄÍѤΥѥ屡¼¥¸¤ò¥À¥¦¥ó¥í¡¼¥É¤·¤ÆÆþ¼ê¤·¤Þ¤¹¡£
¤³¤Î¼ê½ç¤Ï Unity ¤Î¥Ð¡¼¥¸¥ç¥ó¤Ë¤«¤«¤ï¤é¤ºÉ¬Íפʼê½ç¤Ë¤Ê¤ê¤Þ¤¹¡£
¡¡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 ¥Õ¥©¥ë¥À²èÁü
¡¡°Ê¾å¤Ç¥¤¥ó¥Ý¡¼¥È¤Ï´°Î»¤Ç¤¹¡£
¡¡¥¤¥ó¥Ý¡¼¥È»þ¤Ë·Ù¹ð¤¬½Ð¤ë¾ì¹ç¤¬¤¢¤ê¤Þ¤¹¡£
Console ¤Î Clear ¥Ü¥¿¥ó¤ò²¡¤¹¤È²ò¾Ã¤µ¤ì¤Þ¤¹¡£
NavMesh ¤Î·Ù¹ð
¡¡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 ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤ò¥¢¥¿¥Ã¥Á¤·¤Þ¤¹¡£
ÄɲäÎÀßÄê¤ÏÉÔÍפǤ¹¤¬¡¢É¬¤º¡¢TilemapCollider2D ¥³¥ó¥Ý¡¼¥Í¥ó¥È ¢ª NavMeshSourceTag2D ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Î½ç¤Ç¥¢¥¿¥Ã¥Á¤·¡¢
½çÈÖ¤ò²èÁü¤Î¤è¤¦¤ËƱ¤¸Ê¤ӽç¤Ë¤·¤Æ¤¯¤À¤µ¤¤¡£¤½¤¦¤·¤Ê¤¤¤È Bake ¤Ë¼ºÇÔ¤·¤Þ¤¹¡£
¡¡Àµ¤·¤¤½çÈ֤ǥ¢¥¿¥Ã¥Á¤µ¤ì¤Æ¤¤¤ë¤³¤È¤ò³Îǧ¤·¤Æ¤ª¤¤¤Æ¤¯¤À¤µ¤¤¡£
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 ¤µ¤ì¤Æ¤¤¤ë¤«³Îǧ¤·¤Þ¤¹¡£
¤³¤ÎÃʳ¬¤Ç¤Ï¡¢¤¹¤Ù¤Æ¤Î¥¿¥¤¥ë¥Þ¥Ã¥×¤¬°ÜÆ°²Äǽ¤ÊÈϰϤˤʤëÁÛÄê¤Ç¤¹¡£
¡¡Àµ¾ï¤Ë Bake ¤µ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ë¤Ï¡¢²èÁü¤ÎÀßÄê¡¢¥¿¥¤¥ë¥Þ¥Ã¥×¤Î¥³¥ó¥Ý¡¼¥Í¥ó¥ÈÆâ¤Îʤӽç¤ò¸«Ä¾¤·¤Æ¤¯¤À¤µ¤¤¡£
¡¡Bake ¤ËÌäÂ꤬¤Ê¤±¤ì¤Ð¡¢NavMeshBuilder2D ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Ë¤¢¤ë Bake On Eneble ¤Ë¥Á¥§¥Ã¥¯¤ò¤¤¤ì¤Æ¤¯¤À¤µ¤¤¡£
¤³¤Î¥Á¥§¥Ã¥¯¤òÆþ¤ì¤ë¤³¤È¤Ë¤è¤ê¡¢Bake ¤·¤¿·ÐÏ©¾ðÊ󤬥»¡¼¥Ö¤µ¤ì¤Þ¤¹¡£
¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
¡¡¤Ê¤ª¡¢¥¿¥¤¥ëÁ´ÂΤǤϤʤ¯¡¢°ìÉôʬ¤Î¤ß¤ò Bake ÂоݤȤ·¤Æ¤ª¤ê¡¢¤«¤Ä Bake ¤¬È¿±Ç¤µ¤ì¤Ê¤¤¾ì¹ç¤Ë¤Ï¡¢¼¡¤Î¼ê½ç¤Ë¤Æ Bake ¤Î Agents ÀßÄê¤ÎÄ´À°¤ò¹Ô¤Ã¤Æ¤¯¤À¤µ¤¤¡£
Î㤨¤Ð²¼µ¤Î²èÁü¤Î¤è¤¦¤Ë¡¢Bake ¤·¤¿¤¤ÈϰϤ¬ºÙ¤«¤Ã¤¿¤ê(¥¿¥¤¥ë1¥Þ¥¹Ê¬)¤¹¤ë¤È¡¢Bake ¤Î Agents ½é´üÀßÄêÃͤǤÏÀµ¾ï¤Ê Bake ¤¬¤Ç¤¤Æ¤¤¤Ê¤¤²ÄǽÀ¤¬¹â¤¤¤Ç¤¹¡£
¡¡°Ê¾å¤ÇÀßÄê¤Ï´°Î»¤Ç¤¹¡£
¡¡É¬Íפ˱þ¤¸¤Æ¡¢°ÜÆ°ÈϰϤÎÄ´À°¤ò¹Ô¤¤¤Þ¤¹¡£
¡¡Bake ¤µ¤ì¤¿·ÐÏ©¤ÇÌäÂê¤Ê¤±¤ì¤Ð¡¢¤³¤Î¼ê½ç¤ÏÉÔÍפǤ¹¡£
¡¡½é´üÃÍ¤Ç Bake ¤ò¹Ô¤¦¤È¡¢ÁÛÄꤷ¤Æ¤¤¤ë¤è¤ê¤â¡¢¥¿¥¤¥ë¥Þ¥Ã¥×¤«¤éÎ¥¤ì¤¿°ÌÃ֤ǤΠBake ¤Ë¤Ê¤ë¾ì¹ç¤¬¤¢¤ê¤Þ¤¹¡£
¤¢¤ë¤¤¤Ï¡¢Bake ¤ÎÈϰϤ¬ÀßÄê°ÊÆâ¤Ë¼ý¤Þ¤é¤º¡¢Bake ¼«ÂΤ¬¤Ç¤¤Æ¤¤¤Ê¤¤¾ì¹ç¤¬¤¢¤ê¤Þ¤¹¡£
¡¡¤³¤ì¤é¤Ï¡¢Bake ¤ò¹Ô¤¦ºÝ¤Î Agents ¤ÎÀßÄê¤Ë¤è¤ë¤â¤Î¤Ç¤¹¡£
¡¡Navigation ¥¦¥¤¥ó¥É¥¦Æâ¤Ë Agents ¥¿¥Ö¤¬¤¢¤ê¤Þ¤¹¤Î¤Ç¡¢¤³¤Á¤é¤Î Radius ¤ÎÃͤò¾®¤µ¤¤Ãͤˤ·¤Æ¤¤¤¯¤³¤È¤Ç¡¢Bake ÈϰϤ¬¹¤¬¤ê¤Þ¤¹¡£
°ÜÆ°ÉÔ²Äǽ¤Ê¥¿¥¤¥ë¥Þ¥Ã¥×¤Ë¤Ê¤ë¤Ù¤¯¶á¤¤°ÌÃ֤ޤǿ¯Æþ¤·¤¿ Bake ¤¬²Äǽ¤Ë¤Ê¤ê¤Þ¤¹¡£
Navigation ¥¦¥¤¥ó¥É¥¦/ Agents ¥¿¥Ö¡¡²èÁü
¡¡Bake ¤Ï²¿²ó¤Ç¤â¹Ô¤¨¤Þ¤¹¤Î¤Ç¡¢¤³¤Á¤é¤ÎÀßÄê¤òÊѹ¹¤·¤Æ Bake ¤ò¤ä¤êľ¤·¤Æ¡¢ÁÛÄꤷ¤Æ¤¤¤ë°ÜÆ°ÈϰϤˤʤë¤è¤¦¤ËÄ´À°¤ò¹Ô¤Ã¤Æ¤¯¤À¤µ¤¤¡£
¡¡°Ê¾å¤Ç¤³¤Î¼ê½ç¤Ï½ªÎ»¤Ç¤¹¡£
¡¡¼¡¤Ï¡¡¡Ú£²£Ä¡ÛNavMeshComponents ¤òÍøÍѤ·¤¿·ÐÏ©°ÜÆ°½èÍý¤Î¼ÂÁõÎ㢡¡¤Ç¤¹¡£
- ¥«¥Æ¥´¥ê¡§
- ¿Ê³Ø/¥¹¥¯¡¼¥ë
- ¥×¥í¥°¥é¥ß¥ó¥°
¥³¥á¥ó¥È¤ò¤«¤¯