ºÇ½ª¹¹¿·¡§ orika_ex_miyako 2020ǯ12·î30Æü(¿å) 14:55:16ÍúÎò
¤¤¤Þ¤Þ¤Ç¤Î»ëÅÀ¤Ç¤¢¤ë»°¿Í¾Î»ëÅÀ¤Î¥«¥á¥é¤Ë²Ã¤¨¤Æ¡¢°ì¿Í¾Î»ëÅÀ¥«¥á¥é¤È¼«»£¤ê»ëÅÀ¥«¥á¥é¤òÄɲä·¤Þ¤¹¡£
¡ã´°À®Æ°²è¡ä
https://gyazo.com/d66394aca356a4e9084e42a97b8c75ea
¡¡°Ê²¼¤ÎÆâÍƤǽçÈ֤˼ÂÁõ¤ò¿Ê¤á¤Æ¤¤¤¤Þ¤¹¡£
¼ê½ç£²£³¡¡¡Ý°ì¿Í¾Î»ëÅÀ¥«¥á¥é¤È¼«»£¤ê»ëÅÀ¥«¥á¥é¤Î¼ÂÁõ¡Ý
£³£¸¡¥°ì¿Í¾Î»ëÅÀ¥«¥á¥é¤È¼«»£¤ê»ëÅÀ¥«¥á¥é¤òºîÀ®¤¹¤ë £³£¹¡¥CanvasÆâ¤ËUIÉôÉʤòºîÀ®¤¹¤ë¥¡Ê¥«¥á¥éÀÚ¤êÂؤ¨ÍѤΥܥ¿¥ó¡Ë £´£°¡¥¥¹¥¯¥ê¥×¥È¤ò»È¤Ã¤Æ¡¢°ì¿Í¾Î»ëÅÀ¥«¥á¥é¤È¼«»£¤ê»ëÅÀ¥«¥á¥é¤ÎÀÚ¤êÂؤ¨¤òÀ©¸æ¤¹¤ë
¡¡¿·¤·¤¤³Ø½¬ÆâÍƤϡ¢°Ê²¼¤ÎÄ̤ê¤Ç¤¹¡£
¡¡¡¦switch ʸ¤Îʬ´ôÆâÍƤ˼«Ê¬¤Ç¥³¥á¥ó¥È¤ò½ñ¤¤¤Æ¤ß¤ë
¡¡¿·¤·¤¯ºîÀ®¤¹¤ë¥«¥á¥é¤Ï¾ï¤Ë¥¥ã¥é¤È°ì½ï¤ËÄɽ¾¤·¤ÆÆ°¤¯¤è¤¦¤Ë¤¹¤ë¤¿¤á¡¢Penguin ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤È¤·¤ÆºîÀ®¤·¤Þ¤¹¡£
»Ò¥ª¥Ö¥¸¥§¥¯¥È¤Ï¿Æ»Ò´Ø·¸¤òÍøÍѤ·¤Æ¡¢¿Æ¥ª¥Ö¥¸¥§¥¯¥È¤È°ì½ï¤Ë°ÜÆ°¤ò¤¹¤ë¤¿¤á¡¢¤³¤¦¤¹¤ë¤³¤È¤Ç¥¹¥¯¥ê¥×¥È¤ÎÀ©¸æ¤ò¹Ô¤ï¤º¤ËÄɽ¾¤ÎÀ©¸æ¤ò¹Ô¤¦¤³¤È¤¬½ÐÍè¤Þ¤¹¡£
´°À®¤·¤¿ºÝ¤Î¥Ò¥¨¥é¥ë¥¡¼²èÁü
¡¡£²¤Ä¤Î Camera ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤ò»ý¤Ä¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òºîÀ®¤·¤Æ¡¢¤½¤ì¤¾¤ì¤Î±Ç¤¹ÈϰϤòÀßÄꤷ¡¢°ì¿Í¾Î»ëÅÀ¤È¼«»£¤ê»ëÅÀ¤ò¸ÇÄꤷ¤Æ¤ª¤¤Þ¤¹¡£
¡¡¥«¥á¥é¤ÎºîÀ®¤¬½ªÎ»¤·¤¿¤é¡¢¥«¥á¥é¤ÎÀÚ¤êÂؤ¨¤òÁàºî¤¹¤ë¥Ü¥¿¥ó¤ò²èÌ̤ËÇÛÃÖ¤·¡¢¤½¤ì¤ò¥¹¥¯¥ê¥×¥È¤«¤éÀ©¸æ¤ò¹Ô¤¦¥í¥¸¥Ã¥¯¤È¤·¤Þ¤¹¡£
¡¡ºÇ½é¤Ë¥«¥á¥é¤ò£²¤ÄÄɲ䷤Ƥ¤¤¤Þ¤¹¡£
¡¡Penguin ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÁªÂò¤·¤¿¾õÂ֤DZ¦¥¯¥ê¥Ã¥¯¤ò¤·¤Æ¥á¥Ë¥å¡¼¤ò³«¤¡¢Camera ¤òÁªÂò¤·¤Þ¤¹¡£
Camera ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤¬¥¢¥¿¥Ã¥Á¤µ¤ì¤Æ¤¤¤ë¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬ Penguin ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤È¤·¤ÆºîÀ®¤µ¤ì¤Þ¤¹¡£
̾Á°¤ò FPSCamera ¤ËÊѹ¹¤·¤Æ¤¯¤À¤µ¤¤¡£¤³¤Î¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬°ì¿Í¾Î»ëÅÀ¤Î¥«¥á¥é¤ÎÌò³ä¤ò»ý¤Á¤Þ¤¹¡£
¥Ò¥¨¥é¥ë¥¡¼²èÁü
¡¡
¡¡ºÇ½é¤Ë¡¢AudioListener ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤ò Remove ¤·¤Æ¤¯¤À¤µ¤¤¡£
¡¡Unity ¤Ç¤Ï¤³¤Î¥³¥ó¥Ý¡¼¥Í¥ó¥È¤òÍøÍѤ·¤Æ¥²¡¼¥àÆâ¤Î²»¤ò¥¹¥Ô¡¼¥«¡¼¤Ë½ÐÎϤ·¤Æ¤¤¤Þ¤¹¡£
¤³¤Î¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Ï¥²¡¼¥à¥·¡¼¥ó¤Ë£±¤Ä¤À¤±Â¸ºß¤·¤Æ¤¤¤ì¤ÐÆ°ºî¤·¡¢¤¹¤Ç¤Ë Main Camera ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ë¥¢¥¿¥Ã¥Á¤µ¤ì¤Æ¤¤¤ë¤¿¤á
£²¤ÄÌܰʹߤΠAudioListener ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤ÏÉÔÍפˤʤ뤿¤á¤Ç¤¹¡£
¡¡Â³¤±¤Æ¡¢²¼µ¤ÎScene¥Ó¥å¡¼²èÁü¤ä¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü¤ò»²¹Í¤Ë¤·¤Ê¤¬¤é¡¢Game¥Ó¥å¡¼¤Ë°Ü¤ë±ÇÁü¤¬¡¢°ì¿Í¾Î»ëÅÀ¤È¤Ê¤ë¤è¤¦¤Ë¥«¥á¥é¤Î°ÌÃÖ¤òÄ´À°¤·¤Æ¤¯¤À¤µ¤¤¡£
¥²¡¼¥à¤ò¼Â¹Ô¤·¡¢¥¥ã¥é¤¬¸«¤¨¤Ê¤¤¾õÂ֤ˤʤꡢ°ì¿Í¾Î»ëÅÀ¤ÇÍî²¼¤·¤Æ¤¤¤ë±ÇÁü¤Ë¤Ê¤ì¤ÐÌäÂꤢ¤ê¤Þ¤»¤ó¡£
FPSCamera ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
FPSCamera ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¡Scene¥Ó¥å¡¼²èÁü
FPSCamera ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¡Game¥Ó¥å¡¼²èÁü
¡¡¥«¥á¥é¤Î°ÌÃÖ¤ÎÄ´À°¤¬½ªÎ»¤·¤¿¤é¡¢Camera ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Î Depth ¤ÎÃͤò 0 => -2 ¤ËÊѹ¹¤·¤Æ¤¯¤À¤µ¤¤¡£
Main Camera ¤Î Depth ¤ÎÃͤ¬ -1 ¤Ç¤¢¤ë¤¿¤á¡¢Game¥Ó¥å¡¼¤Ëɽ¼¨¤µ¤ì¤ë¥«¥á¥é¤Î±ÇÁü¤¬ Main Camera ¤ËÌá¤ê¤Þ¤¹¡£
(Depth ¤ÎÃͤ¬Âç¤¤Ê Camera ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Î¾ðÊó¤Ç Game¥Ó¥å¡¼¤ËÉÁ²è¤µ¤ì¤Þ¤¹)
FPSCamera ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
¡¡Æ±¤¸¼ê½ç¤Ç¤â¤¦£±¤Ä¡¢¥«¥á¥é¤òºîÀ®¤·¤Þ¤¹¡£
¡¡Penguin ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÁªÂò¤·¤¿¾õÂ֤DZ¦¥¯¥ê¥Ã¥¯¤ò¤·¤Æ¥á¥Ë¥å¡¼¤ò³«¤¡¢Camera ¤òÁªÂò¤·¤Þ¤¹¡£
Camera ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤¬¥¢¥¿¥Ã¥Á¤µ¤ì¤Æ¤¤¤ë¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬ Penguin ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤È¤·¤ÆºîÀ®¤µ¤ì¤Þ¤¹¡£
̾Á°¤ò SelfishCamera ¤ËÊѹ¹¤·¤Æ¤¯¤À¤µ¤¤¡£¤³¤Î¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬¼«»£¤ê»ëÅÀ¤Î¥«¥á¥é¤ÎÌò³ä¤ò»ý¤Á¤Þ¤¹¡£
¥Ò¥¨¥é¥ë¥¡¼²èÁü
¡¡¤³¤Á¤é¤âºÇ½é¤Ë¡¢AudioListener ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤ò Remove ¤·¤Æ¤¯¤À¤µ¤¤¡£
¡¡²¼µ¤ÎScene¥Ó¥å¡¼²èÁü¤ä¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü¤ò»²¹Í¤Ë¤·¤Ê¤¬¤é¡¢Game¥Ó¥å¡¼¤Ë°Ü¤ë±ÇÁü¤¬¡¢¼«»£¤ê»ëÅÀ¤È¤Ê¤ë¤è¤¦¤Ë¥«¥á¥é¤Î°ÌÃÖ¤òÄ´À°¤·¤Æ¤¯¤À¤µ¤¤¡£
¥²¡¼¥à¤ò¼Â¹Ô¤·¡¢¥¥ã¥é¤ò¼«»£¤ê¤·¤Ê¤¬¤éÍî²¼¤·¤Æ¤¤¤ë±ÇÁü¤Ë¤Ê¤ì¤ÐÌäÂꤢ¤ê¤Þ¤»¤ó¡£
SelfishCamera ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
SelfishCamera ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¡Scene¥Ó¥å¡¼²èÁü
SelfishCamera ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¡Game¥Ó¥å¡¼²èÁü
¡¡¥«¥á¥é¤Î°ÌÃÖ¤ÎÄ´À°¤¬½ªÎ»¤·¤¿¤é¡¢Camera ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Î Depth ¤ÎÃͤò 0 => -2 ¡¢¤¢¤ë¤¤¤Ï¤½¤ì°Ê²¼¤ËÊѹ¹¤·¤Æ¤¯¤À¤µ¤¤¡£
Íýͳ¤ÏÀè¤Û¤É¤ÈƱ¤¸¤Ç¡¢Game¥Ó¥å¡¼¤Îɽ¼¨¤ò Main Camera ¤ÎCamera¥³¥ó¥Ý¡¼¥Í¥ó¥È¤ò»²¾È¤·¤¿¤â¤Î¤ËÌ᤹¤¿¤á¤Ç¤¹¡£
¡ÊFPSCamera ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î Camera ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Î Depth ¤ÎÃͤâ -2 ¤Ç¤¹¤Î¤Ç¡¢Æ±¤¸ÃͤËÀßÄꤷ¤¿¾ì¹ç¤Ë¤Ï¡¢
¡¡¥Ò¥¨¥é¥ë¥¡¼¤Îʤӽ礬²¼¤Ë¤¢¤ë Camera¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Î Depth ¤¬Í¥À褵¤ì¤Þ¤¹¤¬¡¢MainCamera ¤Î Depth ¤¬ -1 ¤Ç¤¹¤Î¤ÇGame¥Ó¥å¡¼¤Ø¤Î±Æ¶Á¤Ï¤¢¤ê¤Þ¤»¤ó¡£¡Ë
¡¡Camera ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤ÎÀßÄê¤ÏÆäËɬÍפ¢¤ê¤Þ¤»¤ó¤¬¡¢Clipping Planes ¤Î far ¤ÎÃÍ¤Ï 100 Á°¸å¤Þ¤Ç²¼¤²¤Æ¤âÌäÂꤢ¤ê¤Þ¤»¤ó¡£
Depth¤ÎÃÍ¡¢¤ª¤è¤Ó¡¢¤³¤Îµ¡Ç½¤¬¤É¤¦¤¤¤Ã¤¿ºîÍѤò¤â¤¿¤é¤·¤Æ¤¤¤ë¤«¤Ï¡¢¼«Ê¬¤ÇÄ´¤Ù¤Æ³Ø½¬¤·¤Æ¤ª¤¤Þ¤·¤ç¤¦¡£
SelfishCamera ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
¡¡°Ê¾å¤Ç¥«¥á¥é¤ÎÄɲäϴ°Î»¤Ç¤¹¡£
¡¡¥²¡¼¥à²èÌ̤˥ܥ¿¥ó¤òÇÛÃÖ¤·¤Æ¡¢¥Ü¥¿¥ó¤ò²¡¤¹¤¿¤Ó¤Ë¥«¥á¥é¤ò½çÈÖ¤ËÀÚ¤êÂؤ¨¤ë¤è¤¦¤ËÀ©¸æ¤ò¼ÂÁõ¤·¤Æ¤¤¤¤Þ¤¹¡£
¡¡
¡¡Ä̾ï¤Î»°¿Í¾Î»ëÅÀ¥«¥á¥é¡¡¢ª¡¡°ì¿Í¾Î»ëÅÀ¥«¥á¥é¡¡¢ª¡¡¼«»£¤ê»ëÅÀ¥«¥á¥é¡¡¢ª¡¡Ä̾ï¤Î»°¿Í¾Î»ëÅÀ¥«¥á¥é¡¡¤È¥ë¡¼¥×¤¹¤ë¤è¤¦¤ËÀ©¸æ¤·¤Þ¤¹¡£
¡¡¥Ü¥¿¥ó¤òÀßÃÖ¤¹¤ë¤¿¤á¤Ë¤Ï¡¢ Button ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤ò»ý¤Ä¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬É¬Íפˤʤê¤Þ¤¹¡£
Button ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤ò»ý¤Ä¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ï Canvas ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤Ç¤Ï¤Ê¤¤¤ÈÆ°ºî¤·¤Þ¤»¤ó¡£
¡¡¤¹¤Ç¤Ë Canvas ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ë¤Ï Buttons ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤È¤¤¤¦¡¢¥Ü¥¿¥ó´ÉÍýÍѤΥե©¥ë¥ÀÌò¤Î¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬¤¢¤ê¤Þ¤¹¤Î¤Ç¡¢
¤³¤Î Buttons ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤È¤·¤Æ¡¢¿·¤·¤¤ Button ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÄɲä·¤Þ¤¹¡£
¡¡ÀßÃÖ¤¬´°Î»¤·¤¿¤é¡¢Button ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤òÀ©¸æ¤¹¤ë¥×¥é¥°¥í¥à¤ò CameraController ¥¹¥¯¥ê¥×¥È¤ËÄɲä·¤Æ Button ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤È¥«¥á¥é¤òÀ©¸æ¤·¤Þ¤¹¡£
¥Ò¥¨¥é¥ë¥¡¼²èÁü¡¡´°À®¿Þ
£²¡¥Buttons ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤È¤·¤Æ¡¢btnChangeCamera ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òºîÀ®¤·¤ÆÀßÄê¤ò¹Ô¤¦
¡¡Buttons ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î¾å¤Ç±¦¥¯¥ê¥Ã¥¯¤ò¤·¤Æ¥á¥Ë¥å¡¼¤ò³«¤¡¢UI => Button ¤òÁªÂò¤·¤Þ¤¹¡£
Button ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤¬¥¢¥¿¥Ã¥Á¤µ¤ì¤¿¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬¿·¤·¤¯ºîÀ®¤µ¤ì¤Þ¤¹¤Î¤Ç¡¢Ì¾Á°¤ò btnChangeCamera ¤ËÊѹ¹¤·¤Þ¤¹¡£
btnChangeCamera ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¡¥Ò¥¨¥é¥ë¥¡¼²èÁü
¡¡btnChangeCamera ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ï¥Ü¥¿¥ó¤ÎÀ©¸æ¤È¥Ü¥¿¥ó¤ÎÇطʲèÁü¤ÎÀßÄê¤ò¹Ô¤¦¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ç¤¹¡£
btnChangeCamera ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
btnChangeCamera ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¡Scene¥Ó¥å¡¼²èÁü
¡¡ºÇ½é¤Ë btnChangeCamera ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤Ë¤¢¤ë Text ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ïº£²ó»ÈÍѤ·¤Þ¤»¤ó¤Î¤Ç¡¢¤³¤ì¤òºï½ü¤·¤Þ¤¹¡£
¡¡Â³¤¤¤Æ¡¢btnChangeCamera ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤ò³Îǧ¤·¡¢Image ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Î Source Image ¤ÎÉôʬ¤Ë²èÁü¤òÀßÄꤷ¤Þ¤¹¡£
¡¡ÇØ·ÊÍѤβèÁü¤Ç¤¹¤¬¡¢¥¤¥ó¥Ý¡¼¥È¤·¤¿¥¢¥»¥Ã¥È¤«¤éÁªÂò¤·¤Æ¤â¤è¤¤¤Ç¤¹¤·¡¢²èÁü¤ò¥À¥¦¥ó¥í¡¼¥É¤·¤Æ¤¤Æ¥¤¥ó¥Ý¡¼¥È¤·¤ÆÍøÍѤ·¤Æ¤â¡¢¤É¤Á¤é¤Ç¤â¹½¤¤¤Þ¤»¤ó¡£
¤³¤Á¤é¤Î²èÁü¤¬¥²¡¼¥à²èÌ̤ËŬÍѤµ¤ì¤Þ¤¹¡£
¡¡º£²ó¤Ï¤³¤Á¤é¤Î¥Ñ¥¹¤Ë¤¢¤ë²èÁü¤òÍøÍѤ·¤Æ¤¤¤Þ¤¹¡£
Assets/JKT_Art/UI/Arrow/box_6.png
¥Õ¥©¥ë¥À²èÁü
¡¡²èÁü¤òÀßÄꤷ¤¿¤é¡¢Â礤µ¤òÄ´À°¤·¤Þ¤¹¡£
Scene¥Ó¥å¡¼¤ÇľÀÜÊѹ¹¤·¤Æ¤â¤è¤¤¤Ç¤¹¤·¡¢RectTransform ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Î Width¡¢Height ¤ÎÃͤòÊѹ¹¤·¤Æ¤âÄ´À°¤Ç¤¤Þ¤¹¡£
²¼µ¤Î¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü¤ò»²¹Í¤Ë¤·¤Æ¡¢Å¬µ¹¤Ê¥µ¥¤¥º¤ËÄ´À°¤·¤Æ¤¯¤À¤µ¤¤¡£(Ʊ¤¸¤Ç¤¢¤ëɬÍפϤ¢¤ê¤Þ¤»¤ó)
btnChangeCamera ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü¡
btnChangeCamera ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü¢
btnChangeCamera ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¡Scene¥Ó¥å¡¼²èÁü¡
btnChangeCamera ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¡Scene¥Ó¥å¡¼²èÁü¢
btnChangeCamera ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¡Game¥Ó¥å¡¼²èÁü
¡¡°Ê¾å¤ÇÀßÄê¤Ï´°Î»¤Ç¤¹¡£Button ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Ë¤ÏÊѹ¹¤Ï¤¢¤ê¤Þ¤»¤ó¡£
¡¡¤Ä¤Å¤¤¤Æ¥Ü¥¿¥óÍѤΥ¢¥¤¥³¥ó²èÁüÍѤΥ²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ò btnChangeCamera ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤È¤·¤ÆºîÀ®¤·¤Þ¤¹¡£
£³¡¥btnChangeCamera ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤È¤·¤Æ¡¢imgCamera ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òºîÀ®¤¹¤ë
¡¡btnChangeCamera ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î¾å¤Ç±¦¥¯¥ê¥Ã¥¯¤ò¤·¤Æ¥á¥Ë¥å¡¼¤ò³«¤¡¢UI => Image ¤òÁªÂò¤·¤Þ¤¹¡£
Image ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤¬¥¢¥¿¥Ã¥Á¤µ¤ì¤¿¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬¿·¤·¤¯ºîÀ®¤µ¤ì¤Þ¤¹¤Î¤Ç¡¢Ì¾Á°¤ò imgCamera ¤ËÊѹ¹¤·¤Þ¤¹¡£
imgCamera ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¡¥Ò¥¨¥é¥ë¥¡¼²èÁü
¡¡imgCamera ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ï¥Ü¥¿¥ó¤Î¥¢¥¤¥³¥ó²èÁü¤ÎÀßÄê¤ò¹Ô¤¦¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ç¤¹¡£
imgCamera ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
imgCamera ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¡Scene¥Ó¥å¡¼²èÁü
¡¡ºÇ½é¤Ë²èÁü¤òÀßÄꤷ¤Þ¤¹¡£
imgCamera ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤ò³Îǧ¤·¡¢Image ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Î Source Image ¤ÎÉôʬ¤Ë²èÁü¤òÀßÄꤷ¤Þ¤¹¡£
¡¡¥¢¥¤¥³¥óÍѤβèÁü¤Ç¤¹¤¬¡¢¥¤¥ó¥Ý¡¼¥È¤·¤¿¥¢¥»¥Ã¥È¤«¤éÁªÂò¤·¤Æ¤â¤è¤¤¤Ç¤¹¤·¡¢²èÁü¤ò¥À¥¦¥ó¥í¡¼¥É¤·¤Æ¤¤Æ¥¤¥ó¥Ý¡¼¥È¤·¤ÆÍøÍѤ·¤Æ¤â¡¢¤É¤Á¤é¤Ç¤â¹½¤¤¤Þ¤»¤ó¡£
¤³¤Á¤é¤Î²èÁü¤¬¥²¡¼¥à²èÌ̤ËŬÍѤµ¤ì¤Þ¤¹¡£
¡¡º£²ó¤Ï¤³¤Á¤é¤Î¥Ñ¥¹¤Ë¤¢¤ë²èÁü¤òÍøÍѤ·¤Æ¤¤¤Þ¤¹¡£
Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonCameraCycleUpSprite.png
¥Õ¥©¥ë¥À²èÁü
¡¡²èÁü¤ÎÀßÄ꤬½ªÎ»¤·¤¿¤é¡¢Raycast Target ¤Î¥¹¥¤¥Ã¥Á¤ò³°¤·¤Æ¥ª¥Õ¤Ë¤·¤Æ¤ª¤¤¤Æ¤¯¤À¤µ¤¤¡£
¡¡²èÁü¤òÀßÄꤷ¤¿¤é¡¢Â礤µ¤òÄ´À°¤·¤Þ¤¹¡£
Scene¥Ó¥å¡¼¤ÇľÀÜÊѹ¹¤·¤Æ¤â¤è¤¤¤Ç¤¹¤·¡¢RectTransform ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Î Width¡¢Height ¤ÎÃͤòÊѹ¹¤·¤Æ¤âÄ´À°¤Ç¤¤Þ¤¹¡£
²¼µ¤Î¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü¤ò»²¹Í¤Ë¤·¤Æ¡¢Å¬µ¹¤Ê¥µ¥¤¥º¤ËÄ´À°¤·¤Æ¤¯¤À¤µ¤¤¡£(Ʊ¤¸¤Ç¤¢¤ëɬÍפϤ¢¤ê¤Þ¤»¤ó)
imgCamera ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
imgCamera ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¡Scene¥Ó¥å¡¼²èÁü¡
imgCamera ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¡Scene¥Ó¥å¡¼²èÁü¢
imgCamera ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¡Game¥Ó¥å¡¼²èÁü
¡¡°Ê¾å¤Ç¥Ü¥¿¥ó¤Î´°À®¤Ç¤¹¡£ºÇ¸å¤Ë¥¹¥¯¥ê¥×¥È¤ò½¤Àµ¤·¤Æ¡¢¥Ü¥¿¥ó¤È¥«¥á¥é¤È¤ò¥¹¥¯¥ê¥×¥È¤«¤éÁàºîÀ©¸æ¤Ç¤¤ë¤è¤¦¤Ë¤·¤Þ¤¹¡£
¡¡¥«¥á¥é¤ÎÀ©¸æ¤Ë¤Ï¸½ºß¡¢CameraController ¥¹¥¯¥ê¥×¥È¤òÍøÍѤ·¤Æ¤¤¤Þ¤¹¡£
¥«¥á¥é¤ÎÀÚ¤êÂؤ¨¤â¥«¥á¥é¤Ë´ØÏ¢¤¹¤ë½èÍý¤Ç¤¹¤Î¤Ç¡¢¤³¤Á¤é¤Î¥¹¥¯¥ê¥×¥È¤Ëµ½Ò¤òÄɲä·¡¢
¥«¥á¥é¤ÎÀ©¸æ¤Ï¤¹¤Ù¤Æ CameraController ¥¹¥¯¥ê¥×¥È¤Ç´ÉÍý¤Ç¤¤ë¤è¤¦¤Ë¤·¤Æ¤ª¤¤Þ¤¹¡£
¡¡¥«¥á¥é¤ÎÊѹ¹¤Ï¥Ü¥¿¥ó¤ò²¡¤¹¤¿¤Ó¤ËÀÚ¤êÂؤï¤ë¤è¤¦¤ËÀ©¸æ¤·¤¿¤¤¤¿¤á¡¢
¥¹¥¯¥ê¥×¥È¤«¤é¤Ï¡¢¥«¥á¥é¤ÎÁàºî¡¢¤ª¤è¤Ó¥Ü¥¿¥ó¤ÎÁàºî¤ò¹Ô¤¨¤ë¤è¤¦¤Ë¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
¡¡¥í¥¸¥Ã¥¯¤È¤·¤Æ¤Ï¡¢¥¹¥¯¥ê¥×¥È¤Ë¥«¥á¥é¤ÎÊѹ¹½èÍý¤ò¹Ô¤¦¥á¥½¥Ã¥É¤òÍÑ°Õ¤·¤Æ¤ª¤¡¢¤½¤ì¤ò¥Ü¥¿¥ó¤ò²¡¤¹¤¿¤Ó¤Ë¸Æ¤Ó½Ð¤·¤Þ¤¹¡£¡¡
¥á¥½¥Ã¥ÉÆâ¤Ç¤Ï¸½ºß¤Î¥«¥á¥é¤ÎÄ̤·Èֹ椫¤é¡¢¼¡¤Î¥«¥á¥é¤ÎÀßÄê¤ò¹Ô¤¦¤è¤¦¤ËÀ©¸æ¤·¤Þ¤¹¡£
¡¡¥«¥á¥é¤È¥Ü¥¿¥ó¤òÁàºî¤¹¤ë¤¿¤á¤ËɬÍפʷ¿¤ÈÊÑ¿ô¤ò¤½¤ì¤¾¤ìÀë¸À¤·¤Æ¤ª¤¤Þ¤¹¡£
¤¤¤º¤ì¤â SerializeField°À¤ÇÀë¸À¤·¤Æ¤ª¤¯¤³¤È¤Ç¡¢¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤«¤é¥¢¥µ¥¤¥ó¤ò¹Ô¤¨¤ë¤è¤¦¤Ë¤·¤Þ¤¹¡£
¡¡¥Ü¥¿¥ó¤Î OnClick ¥¤¥Ù¥ó¥È¤Ë¤Ï ChangeCamera ¥á¥½¥Ã¥É¤òÅÐÏ¿¤·¡¢¥Ü¥¿¥ó¤ò²¡¤¹¤¿¤Ó¤Ë¤³¤Î¥á¥½¥Ã¥É¤ò¸Æ¤Ó½Ð¤·
¥«¥á¥é¤ò½çÈÖ¤ËÀÚ¤êÂؤ¨¤Æ¤¤¤¯À©¸æ¤ò¹Ô¤¤¤Þ¤¹¡£¼«»£¤ê¥«¥á¥é¤Î»þ¤Ë¥Ü¥¿¥ó¤ò²¡¤·¤¿¤é¡¢ºÇ½é¤Î»°¿Í¾Î»ëÅÀ¥«¥á¥é¤ËÌá¤ëÀ©¸æ¤ò¤·¤Æ¤¤¤Þ¤¹¡£
¤³¤Î¥á¥½¥Ã¥É¤Ë¤Ï¥³¥á¥ó¥Èʸ¤ò¾Êά¤·¤Æ¤¢¤ê¤Þ¤¹¤Î¤Ç¡¢½èÍý¤òÆɤó¤Ç¼«Ê¬¤Ç¥³¥á¥ó¥È¤ò½ñ¤¤¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡£
CameraController.cs
¡¡¥¹¥¯¥ê¥×¥È¤Î½¤Àµ¤¬´°Î»¤·¤¿¤Î¤Ç¡¢MainCamera ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤«¤é CameraController ¥¹¥¯¥ê¥×¥È¤ò³Îǧ¤·¤Þ¤¹¡£
¿·¤·¤¯Àë¸À¤·¤¿ÊÑ¿ô¤Î¥¢¥µ¥¤¥ó¾ðÊ󤬣³¤Ä¡¢É½¼¨¤µ¤ì¤Æ¤¤¤ì¤ÐÌäÂꤢ¤ê¤Þ¤»¤ó¡£
Main Camera ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
¡¡¤¹¤Ù¤Æ¤Î¼ê½ç¤¬´°Î»¤·¤Þ¤·¤¿¤Î¤Ç¡¢¥²¡¼¥à¤ò¼Â¹Ô¤·¤Æ¡¢¥«¥á¥é¤Î¥Ü¥¿¥ó¤ò²¡¤·¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡£
²¡¤¹¤¿¤Ó¤Ë¥«¥á¥é¤¬ÀÚ¤êÂؤï¤ì¤ÐÀ©¸æÀ®¸ù¤Ç¤¹¡£Äɲä·¤¿¥«¥á¥é¤Ï¡¢¥¥ã¥é¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤Ç¤¹¤Î¤Ç¡¢
¥¥ã¥é¤Î°ÜÆ°¤Ë¹ç¤ï¤»¤Æ¤Á¤ã¤ó¤ÈÄɽ¾¤·¤Æ¤¤¤Þ¤¹¡£
¡¡»ÑÀª¤ÎÊѹ¹¤â²Äǽ¤Ç¤¹¤¬¡¢ÅöÁ³¡¢¥«¥á¥é¤âƱ¤¸¤è¤¦¤ËÊѹ¹¤µ¤ì¤Þ¤¹¡£
¡ã¼Â¹ÔÆ°²è¡ä
https://gyazo.com/29f55df429aec7665615534e6f0323b6
¡ã¸¡¾ÚÆ°²è¡¡°ì¿Í¾Î»ëÅÀ¤Ç»ÑÀª¤òÊѤ¨¤ë¤È¡¢¤Á¤ã¤ó¤È¥«¥á¥é¤âÌÜÀþ¤Ë¹ç¤ï¤»¤ÆÆ°¤¯¡ä
https://gyazo.com/07839449102a2f6b5b94e8f893d3bc5d
¡¡°Ê¾å¤Ç¤³¤Î¼ê½ç¤Ï½ªÎ»¤Ç¤¹¡£
¡¡=>¡¡¼¡¤Ï¡¡¼ê½ç£²£´¡¡¡¼¥²¡¼¥à¥¯¥ê¥¢½èÍý¤Î¼ÂÁõ¡¼¡¡¤Ç¤¹¡£
- ¥«¥Æ¥´¥ê¡§
- ¿Ê³Ø/¥¹¥¯¡¼¥ë
- ¥×¥í¥°¥é¥ß¥ó¥°
¥³¥á¥ó¥È¤ò¤«¤¯