Unity¤Ë´ØÏ¢¤¹¤ëµ­»ö¤Ç¤¹

¡¡AR Camera ¤Ë¤è¤ëÊ¿Ì̤δ¶Ãε¡Ç½¤È¡¢´¶ÃΤ·¤¿Éôʬ¤ò¥¿¥Ã¥×¤¹¤ë¤³¤È¤Ç¡¢¤½¤³¤Ë¥¹¥Æ¡¼¥¸¤òɽ¼¨¤·¤ÆÍ·¤Ù¤ë¤è¤¦¤Ë¤¹¤ëµ¡Ç½¤ò¼ÂÁõ¤·¤Þ¤¹¡£

¡¡°Ê²¼¤ÎÆâÍƤǽçÈ֤˼ÂÁõ¤ò¿Ê¤á¤Æ¤¤¤­¤Þ¤¹¡£

ȯŸ£·¡¡¡¼AR Camera ¤Ë¤è¤ëÊ¿Ì̤δ¶Ãε¡Ç½¤Î¼ÂÁõ¡¼
£±£±¡¥AR Camera ¤Ë¤è¤ëÊ¿Ì̤δ¶Ãε¡Ç½¤ò¼ÂÁõ¤¹¤ë



¡¡¿·¤·¤¤³Ø½¬ÆâÍƤϡ¢°Ê²¼¤ÎÄ̤ê¤Ç¤¹¡£

¡¡¡¦AR Camera ¤Ë¤è¤ëÊ¿ÌÌ´¶ÃÎ



£±£±¡¥AR Camera ¤Ë¤è¤ëÊ¿Ì̤δ¶Ãε¡Ç½¤ò¼ÂÁõ¤¹¤ë

£±¡¥Àß·×


¡¡¤³¤Î¼ê½ç¤Ç¤Ï¥Ò¥¨¥é¥ë¥­¡¼¤Ë¤¢¤ë¥¹¥Æ¡¼¥¸¤ò°ìöÈóɽ¼¨¤Ë¤·¤¿¤¢¤È¡¢Ê¿ÌÌ´¶ÃΤ·¤¿Éôʬ¤ò¥¿¥Ã¥×¤¹¤ë¤³¤È¤Ë¤è¤ê¡¢ºÆÅÙ¥¹¥Æ¡¼¥¸É½¼¨¤µ¤»¤ëµ¡Ç½¤òÄɲä·¤Þ¤¹¡£

¡¡¤¿¤À¤·¤³¤ì¤Ï¤¢¤¯¤Þ¤Ç¤â¥Ò¥¨¥é¥ë¥­¡¼¤Ë¤¢¤ë Stage ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òºÆɽ¼¨¤¹¤ë¤À¤±¤Ç¤¢¤ë¤¿¤á¡¢
AR ¥«¥á¥é¤¬´¶ÃΤ·¤¿Ê¿Ì̤ËÂФ·¤Æ¿·¤·¤¤ Stage ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÀ¸À®¤·¤Æ¤¤¤ëÌõ¤Ç¤¢¤ê¤Þ¤»¤ó¡£
¤½¤Î¤¿¤á¡¢´¶ÃΤ·¤Æ¤¤¤ë¤É¤ÎÊ¿Ì̤ò¥¿¥Ã¥×¤·¤Æ¤â¡¢¾ï¤ËƱ¤¸°ÌÃÖ¤Ë Stage ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬ºÆÅÙɽ¼¨¤µ¤ì¤Þ¤¹¡£

¡¡¤è¤Ã¤Æ¤Þ¤º¤ÏÊ¿ÌÌ´¶ÃΤε¡Ç½¤ò³Îǧ¤¹¤ë¡¢¤È¤¤¤¦°ÕÌ£¤Ç¡¢¥Ò¥¨¥é¥ë¥­¡¼¤Ë¤¢¤ë Stage ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ÎºÆɽ¼¨¤¬Æ°ºî¤¹¤ë¤«¤ò³Îǧ¤·¤Þ¤¹¡£
Ê¿ÌÌ´¶ÃΤ¬µ¡Ç½¤·¤Æ¤¤¤ì¤Ð Stage ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬¸«¤¨¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£

¡¡¤½¤·¤Æ¼¡¤Î¼ê½ç¤Ç¤Ï¤³¤ÎÉôʬ¤ò¡¢Ê¿Ì̤ò¥¿¥Ã¥×¤·¤¿ÃÏÅÀ¤Ë¥¹¥Æ¡¼¥¸¤òÀ¸À®¤¹¤ë½èÍý¤ËÊѹ¹¤·¤Þ¤¹¡£
¤½¤¦¤¹¤ë¤³¤È¤Ë¤è¤ê¡¢¤³¤Î¼ê½ç¤Ç¤Ï¤Ç¤­¤Ê¤«¤Ã¤¿¡ÖÊ¿ÌÌ´¶ÃΤ·¤¿ÃÏÅÀ¤ËÂФ·¤Æ¡×Stage ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬É½¼¨¤µ¤ì¤ë¤è¤¦¤Ë½¤Àµ¤ò¹Ô¤Ã¤Æ¤¤¤­¤Þ¤¹¡£



¡¡½èÍý¤ÎÆ°ºî³Îǧ¤ÎÊýË¡¤Ë¤Ï Debug.Log ¥á¥½¥Ã¥É¤ò³èÍѤ¹¤ëÊýË¡¤â¤¢¤ê¤Þ¤¹¤¬¡¢
Æ°ºî¤ò³Îǧ¤·¤¿¤¤µ¡Ç½¤ò¡¢¥²¡¼¥àÆâ¤Î½èÍý¤Ëɳ¤Å¤±¤ÆÍøÍѤ¹¤ë¤³¤È¤Ç¤âÆ°ºî¸¡¾Ú¤¬¹Ô¤¨¤Þ¤¹¡£
£±¤Ä¤º¤Ä¡¢½èÍý¤òÀѤ߽Ťͤƥ²¡¼¥à¤òºî¤Ã¤Æ¤¤¤­¤Þ¤¹¤¬¡¢Á´ÂΤȤ·¤Æ¤ÎÌÜɸ¤âǰƬ¤ËÃÖ¤¤¤Æ¤ª¤¯¤È¡¢
¸½ºß¤Î¼ê½ç¤Ç½ÐÍè¤ë¤³¤È¤È¡¢¼¡¤Î¼ê½ç¤Ç¹Ô¤¦¤³¤È¤Ø¤ÎÍý²òÅÙ¤¬¿¼¤Þ¤ê¡¢ºî¤Ã¤Æ¤¤¤¯¥¤¥á¡¼¥¸¤¬¤ï¤­¤ä¤¹¤¯¤Ê¤ê¤Þ¤¹¡£


£²¡¥AR Session Origin ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ò½¤Àµ¤¹¤ë


¡¡¤³¤Î¼ê½ç¤Ï AR Session Origin ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÍøÍѤ·¤Æ¤¤¤ë¾ì¹ç¤Ë¹Ô¤¤¤Þ¤¹¡£

¡¡Ê¿ÌÌ´¶ÃΤ˴ط¸¤¹¤ë¥³¥ó¥Ý¡¼¥Í¥ó¥È(ÍÑ°Õ¤µ¤ì¤Æ¤¤¤ë¥¹¥¯¥ê¥×¥È)¤ò¿·¤·¤¯£²¤Ä¥¢¥¿¥Ã¥Á¤·¤Þ¤¹¡£

¡¡AR Session Origin ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤Î°ìÈÖ²¼¤Ë¤¢¤ë Add Component ¥Ü¥¿¥ó¤ò²¡¤·¤Æ¡¢
AR Plane Manager ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤È AR Raycast Manager ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Î£²¤Ä¤òÄɲ䷤Ƥ¯¤À¤µ¤¤¡£

¡¡ÄɲäÀ¤±¤¹¤ì¤Ð¡¢Â¾¤ÎÀßÄê¤ÏÉÔÍפǤ¹¡£


AR Session Origin ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü




¡¡¤Ê¤ª¡¢XR Origin ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î¾ì¹ç¤Ë¤ÏºÇ½é¤«¤é¥¢¥¿¥Ã¥Á¤µ¤ì¤Æ¤¤¤Þ¤¹¤Î¤Ç¡¢¤³¤Î½¤Àµ¤ÏÉÔÍפǤ¹¡£


XR Origin ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü



¡¡°Ê¾å¤Ç´°Î»¤Ç¤¹¡£


£³¡¥Ê¿ÌÌ´¶ÃΤò¤·¤¿ºÝ¤ËÀ¸À®¤¹¤ë¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òºîÀ®¤·¡¢¥×¥ì¥Õ¥¡¥Ö¤Ë¤¹¤ë


¡¡¤³¤Á¤é¤Ïͽ¤á¡¢Unity ¤¬½àÈ÷¤·¤Æ¤¤¤ëµ¡Ç½¤ò³èÍѤ·¤Þ¤¹¡£

¡¡¥Ò¥¨¥é¥ë¥­¡¼¤Î¶õ¤¤¤Æ¤¤¤ë¾ì½ê¤Ç±¦¥¯¥ê¥Ã¥¯¤ò¤·¤Æ¥á¥Ë¥å¡¼¤ò³«¤­¡¢XR => AR Default Plane ¤òÁªÂò¤·¤Þ¤¹¡£
̾Á°¤â¤½¤Î¤Þ¤Þ¤Ç¹½¤¤¤Þ¤»¤ó¡£


¥Ò¥¨¥é¥ë¥­¡¼²èÁü



¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü



¡¡¤³¤Î AR Default Plane ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ò¤½¤Î¤Þ¤Þ¥×¥ì¥Õ¥¡¥Ö¤Ë¤·¤Þ¤¹¡£
¥×¥ì¥Õ¥¡¥Ö¤Ë¤·¤¿¤é¡¢¥Ò¥¨¥é¥ë¥­¡¼¤è¤êºï½ü¤·¤Þ¤¹¡£


£´¡¥AR Session Origin(XR Origin) ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ÎÀßÄê¤ò¹Ô¤¦


¡¡Àè¤Û¤ÉºîÀ®¤·¤¿ AR Default Plane ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ò¡¢AR Session Origin ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥ÈÆâ¤ËÀßÄꤷ¤Þ¤¹¡£
XR Origin ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÍøÍѤ·¤Æ¤¤¤ë¾ì¹ç¤Ë¤Ï¡¢¤½¤Á¤é¤ËÀßÄꤷ¤Þ¤¹¡£

¡¡AR Session Origin ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¢¤¢¤ë¤¤¤Ï XR Origin ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤ò³Îǧ¤·¡¢
¥¢¥¿¥Ã¥Á¤µ¤ì¤Æ¤¤¤ë AR Plane Manager ¥¹¥¯¥ê¥×¥È¤Î Plane Prefab ÊÑ¿ô¤Ë
¥×¥ì¥Õ¥¡¥Ö¤Ë¤Ê¤Ã¤Æ¤¤¤ë AR Default Plane ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ò¥É¥é¥Ã¥°¥¢¥ó¥É¥É¥í¥Ã¥×¤·¤Æ¥¢¥µ¥¤¥ó¤·¤Æ¤¯¤À¤µ¤¤¡£

¡¡¤³¤ÎÀßÄê¤ò¹Ô¤¦¤³¤È¤Ë¤è¤ê¡¢AR Camera ¤¬Ê¿Ì̤ò´¶ÃΤ¹¤ë¤È¡¢¤½¤ÎÃÏÅÀ¤Ë AR Default Plane ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÀ¸À®¤·¤Æ¤¯¤ì¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£
¤Þ¤¿¡¢´¶ÃÎÈϰϤ˹ç¤ï¤»¤Æ¡¢¥µ¥¤¥º¤ò¼«Æ°Åª¤ËÊѹ¹¤·¤Æ¤¯¤ì¤Þ¤¹¡£¡¡


AR Session Origin ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü



XR Origin ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü



¡¡°Ê¾å¤ÇÀßÄê¤Ï´°Î»¤Ç¤¹¡£


£µ¡¥ARGameManager ¥¹¥¯¥ê¥×¥È¤òºîÀ®¤¹¤ë


¡¡Ê¿ÌÌ´¶ÃΤε¡Ç½¤ò¼ÂÁõ¤¹¤ë¤¿¤á¤Î¥¹¥¯¥ê¥×¥È¤òºîÀ®¤·¤Þ¤¹¡£
¤Ê¤ª¡¢¤³¤Î½ñ¤­Êý¤¬¤¹¤Ù¤Æ¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£
ÆâÍÆŪ¤Ë¤ÏƱ¤¸½èÍý¤Ç¤¢¤Ã¤Æ¤â½ñ¼°¤Ï°Û¤Ê¤ê¤Þ¤¹¤Î¤Ç¡¢¿§¡¹¤Ê¥µ¥¤¥È¤ò³Îǧ¤·¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡£


ARGameManager.cs

<=¡¡¥¯¥ê¥Ã¥¯¤¹¤ë¤È³«¤­¤Þ¤¹¡£



£¶¡¥AR Session Origin(XR Origin) ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ë ARGameManager ¤ò¥¢¥¿¥Ã¥Á¤·¤ÆÀßÄê¤ò¹Ô¤¦


¡¡AR Session Origin ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¢¤¢¤ë¤¤¤Ï XR Origin ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ë ARGameManager ¥¹¥¯¥ê¥×¥È¤ò¥É¥é¥Ã¥°¥¢¥ó¥É¥É¥í¥Ã¥×¤·¤Æ¥¢¥¿¥Ã¥Á¤·¤Þ¤¹¡£

¡¡Â³¤¤¤Æ¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤ò³Îǧ¤·¡¢ÊÑ¿ô¤Î¾ðÊ󤬣²¤Äɽ¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¤Î¤Ç¡¢¤½¤Á¤é¤ËɬÍפʾðÊó¤ò¥¢¥µ¥¤¥ó¤·¤Þ¤¹¡£

¡¡StageObj ÊÑ¿ô¤Ë¤Ï¡¢¥Ò¥¨¥é¥ë¥­¡¼¤Ë¤¢¤ë Stage ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ò¥É¥é¥Ã¥°¥¢¥ó¥É¥É¥í¥Ã¥×¤·¤Æ¥¢¥µ¥¤¥ó¤·¤Þ¤¹¡£
¤³¤ì¤Ï¡¢¤Þ¤À¥×¥ì¥Õ¥¡¥Ö¤òÀ¸À®¤¹¤ë¤Î¤Ç¤Ï¤Ê¤¯¡¢¥Ò¥¨¥é¥ë¥­¡¼¤Ë¤¢¤ë Stage ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÀ©¸æ¤¹¤ë¤¿¤á¤Ç¤¹¡£
¼¡¤Î¼ê½ç¤Ç¤ÏÊѹ¹¤·¤Þ¤¹¤Î¤Ç¡¢³Ð¤¨¤Æ¤ª¤¤¤Æ¤¯¤À¤µ¤¤¡£

¡¡CameraController ÊÑ¿ô¤Ë¤Ï¡¢AR Session Origin ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤« XR Origin ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ë¥¢¥¿¥Ã¥Á¤µ¤ì¤Æ¤¤¤ë CameraController ¥¹¥¯¥ê¥×¥È¤ò¥¢¥µ¥¤¥ó¤·¤Þ¤¹¡£
¥Ò¥¨¥é¥ë¥­¡¼¤Ë¤¢¤ë¡¢¤¤¤º¤ì¤«¤Î¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ò¥É¥é¥Ã¥°¥¢¥ó¥É¥É¥í¥Ã¥×¤·¤Æ¥¢¥µ¥¤¥ó¤·¤Æ¤¯¤À¤µ¤¤¡£


AR Session Origin ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü



XR Origin ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü



¡¡°Ê¾å¤Ç´°À®¤Ç¤¹¡£


£·¡¥¥²¡¼¥à¤ò¼Â¹Ô¤·¤ÆÆ°ºî¤ò³Îǧ¤¹¤ë


¡¡¥Ó¥ë¥É¤ò¹Ô¤¤¡¢¼Âµ¡¤Ë¤Æ¥Æ¥¹¥È¤ò¹Ô¤¤¤Þ¤¹¡£

¡¡¥«¥á¥é¤ò¾²¤ä¥Æ¡¼¥Ö¥ë¤Ê¤É¤Ë¸þ¤±¤ÆÆ°¤«¤·¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡£
Ê¿ÌÌ´¶ÃΤËÀ®¸ù¤¹¤ë¤È¡¢¤½¤ÎÃÏÅÀ¤Ë AR Default Plane ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬À¸À®¤µ¤ì¤Æ¡¢ÈϰϤ¬¼«Æ°Åª¤ËÄ´À°¤µ¤ì¤Þ¤¹¡£

¡¡Ê¿ÌÌ´¶ÃΤ·¤Æ¤¤¤ëÉôʬ¤ò¥¿¥Ã¥×¤¹¤ë¤³¤È¤Ç¡¢¥¹¥Æ¡¼¥¸¤¬É½¼¨¤µ¤ì¤ì¤ÐÀ©¸æÀ®¸ù¤Ç¤¹¡£



¡¡°Ê¾å¤Ç¤³¤Î¼ê½ç¤Ï½ªÎ»¤Ç¤¹¡£

¡¡=>¡¡¼¡¤Ï¡¡È¯Å¸£¸¡¡¡ÝÊ¿Ì̤ò¥¿¥Ã¥×¤·¤¿ÃÏÅÀ¤Ë¥¹¥Æ¡¼¥¸¤òÀ¸À®¤¹¤ëµ¡Ç½¤Î¼ÂÁõ¡Ý¡¡¤Ç¤¹¡£

¥³¥á¥ó¥È¤ò¤«¤¯


¡Öhttp://¡×¤ò´Þ¤àÅê¹Æ¤Ï¶Ø»ß¤µ¤ì¤Æ¤¤¤Þ¤¹¡£

ÍøÍѵ¬Ìó¤ò¤´³Îǧ¤Î¤¦¤¨¤´µ­Æþ²¼¤µ¤¤

Menu


´ðÁÃ

µ»½Ñ/Ãμ±(¼ÂÁõÎã)

3D¥¢¥¯¥·¥ç¥ó¥²¡¼¥à

2D¤ª¤Ï¤¸¤­¥²¡¼¥à(ȯŸÊÔ)

2D¶¯À©²£¥¹¥¯¥í¡¼¥ë¥¢¥¯¥·¥ç¥ó(ȯŸÊÔ)

2D¥¿¥Ã¥×¥·¥å¡¼¥Æ¥£¥ó¥°(³ÈÄ¥ÊÔ)

¥ì¡¼¥¹¥²¡¼¥à(È´¿è)

2DÊüÃÖ¥²¡¼¥à(ȯŸÊÔ)

3D¥ì¡¼¥ë¥¬¥ó¥·¥å¡¼¥Æ¥£¥ó¥°(±þÍÑÊÔ)

3Dæ½Ð¥²¡¼¥à(È´¿è)

2D¥ê¥¢¥ë¥¿¥¤¥à¥¹¥È¥é¥Æ¥¸¡¼

3D¥¿¥Ã¥×¥¢¥¯¥·¥ç¥ó(NavMeshAgent »ÈÍÑ)

2D¥È¥Ã¥×¥Ó¥å¡¼¥¢¥¯¥·¥ç¥ó(¥«¥¨¥ë¤Î°Ù¤Ë¡Á¡¢¥Ü¥³¥¹¥«¥¦¥©¡¼¥ºÉ÷)

VideoPlayer ¥¤¥Ù¥ó¥ÈϢư¤Î¼ÂÁõÎã

VideoPlayer ¥ê¥¹¥ÈÆ⤫¤é¥à¡¼¥Ó¡¼ºÆÀ¸¤Î¼ÂÁõÎã(ȯŸ)

AR ²èÁüÉÕ¤­¥ª¥Ö¥¸¥§¥¯¥ÈÀ¸À®¤Î¼ÂÁõÎã

AR ¥ê¥¹¥ÈÆ⤫¤éÀ¸À®¤Î¼ÂÁõÎã(ȯŸ)

2D¥È¥Ã¥×¥Ó¥å¡¼¥¢¥¯¥·¥ç¥ó(¥µ¥Ð¥¤¥Ð¡¼É÷)

private



¤³¤Î¥µ¥¤¥ÈÆâ¤ÎºîÉʤϥæ¥Ë¥Æ¥£¤Á¤ã¤ó¥é¥¤¥»¥ó¥¹¾ò¹à¤Î¸µ¤ËÄ󶡤µ¤ì¤Æ¤¤¤Þ¤¹¡£

´ÉÍý¿Í/Éû´ÉÍý¿Í¤Î¤ßÊÔ½¸¤Ç¤­¤Þ¤¹