ºÇ½ª¹¹¿·¡§
orika_ex_miyako 2022ǯ03·î24Æü(ÌÚ) 15:47:24ÍúÎò
£²£´¡¥CanvasÆâ¤ËResultPopUp¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡Ê¥ê¥¶¥ë¥Èɽ¼¨ÍѤÎUIÉôÉÊ·²¡Ë¤òºîÀ®¤¹¤ë(ÇØ·Ê¥¤¥á¡¼¥¸¡¢ÅÀ¿ôɽ¼¨¡¢¾Ã¤·¤¿¿ôɽ¼¨¡¢¥¿¥Ã¥×¤òÂ¥¤¹É½¼¨)
¡¡¿·¤·¤¤³Ø½¬ÆâÍƤϡ¢°Ê²¼¤ÎÄ̤ê¤Ç¤¹¡£
¡¦CanvasGroup¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Î»ÈÍÑÊýË¡ ¡¦CanvasRenderer¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Î Cull Transparent Mesh µ¡Ç½
£²£´¡¥CanvasÆâ¤ËResultPopUp¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡Ê¥ê¥¶¥ë¥Èɽ¼¨ÍѤÎUIÉôÉÊ·²¡Ë¤òºîÀ®¤¹¤ë(ÇØ·Ê¥¤¥á¡¼¥¸¡¢ÅÀ¿ôɽ¼¨¡¢¾Ã¤·¤¿¿ôɽ¼¨¡¢¥¿¥Ã¥×¤òÂ¥¤¹É½¼¨) ![](https://static.seesaawiki.jp/img/usr_second/common/icon_pen.gif)
¡¡¥Ò¥¨¥é¥ë¥¡¼¤Ë¤¢¤ëCanvas¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ÎÃæ¤Ë¡¢¿·¤·¤¯¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÄɲ䷤Ƥ¤¤¤Þ¤¹¡£
¤³¤ì¤ÏResultPopUp¤È¤¤¤¦Ì¾Á°¤Ç¡¢¥²¡¼¥à¤Î¥ê¥¶¥ë¥Èɽ¼¨ÍѤΥݥåץ¢¥Ã¥×¤È¤Ê¤ê¤Þ¤¹¡£¤³¤Î¥Ý¥Ã¥×¥¢¥Ã¥×Æâ¤Ë¡¢É½¼¨¤ËɬÍפÊÉôÉʤò¤µ¤é¤Ë²Ã¤¨¤Æ¤¤¤Ã¤Æ´°À®¤µ¤»¤Þ¤¹¡£
¤³¤Î¼ê½ç¤¬½ª¤ï¤Ã¤¿ºÝ¤Ë¤Ï¡¢²¼µ¤Î²èÁü¤Î¤è¤¦¤Ê·Á¤Ë¤Ê¤ê¤Þ¤¹¡£
¥Ò¥¨¥é¥ë¥¡¼¡¡»²¹Í²èÁü
![](https://image01.seesaawiki.jp/i/o/i-school-memo/Out0ieqSVk-s.png)
ResultPopUpÆâ¤Î¥Ò¥¨¥é¥ë¥¡¼²èÁü
![](https://image02.seesaawiki.jp/i/o/i-school-memo/Ji6Kpw9JNi-s.png)
´°À®²èÁü¡¡¡Canvas¤Î¾åÉô¤ËÇÛÃÖ
![](https://image02.seesaawiki.jp/i/o/i-school-memo/mAaAMpSlWW-s.png)
´°À®²èÁü¢
![](https://image01.seesaawiki.jp/i/o/i-school-memo/D3u_0bN5sB-s.png)
¡¡
¡¡´°À®²èÁü¡¤ò¸«¤Æ¤¤¤¿¤À¤¯¤È¤ï¤«¤ë¤è¤¦¤Ë¡¢ResultPopUp¤Ï¥¤¥ó¥¹¥¿¥ó¥·¥¨¥¤¥È¤µ¤»¤ë¤Î¤Ç¤Ï¤Ê¤¯¡¢Canvas¤Î¾åÉô¤Ë±£¤·¤Æ¤ª¤¤¤Æ
¥²¡¼¥à½ªÎ»¤Î¥¿¥¤¥ß¥ó¥°¤Ë¹ç¤ï¤»¤Æ¥²¡¼¥à²èÌÌÆâ¤Ë¥¹¥é¥¤¥É¤µ¤»¤Æɽ¼¨¤µ¤»¤Æ»ÈÍѤ·¤Þ¤¹¡£
¡¡¤â¤Á¤í¤ó¥¤¥ó¥¹¥¿¥ó¥·¥¨¥¤¥È¤¹¤ëÊýË¡¤â¤¢¤ê¤Þ¤¹¤¬¡¢º£²ó¤ÏDoTween¤Îµ¡Ç½¤ò¶µºà¤È¤·¤Æ»ÈÍѤ¹¤ë¤¿¤á¤Ë¤³¤Î¤è¤¦¤ÊÀ߷פˤ·¤Æ¤¤¤Þ¤¹¡£
¡¡Canvas¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î¾å¤Ç±¦¥¯¥ê¥Ã¥¯¤ò¹Ô¤¤¡¢UI => Image ¤òÁªÂò¤·¡¢¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òºîÀ®¤·¤Þ¤¹¡£Ì¾Á°¤ò ResultPopUp ¤ËÊѹ¹¤·¤Þ¤¹¡£
ResultPopUp¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ç¤Ï¡¢¥ê¥¶¥ë¥È»þ¤ÎÇطʲèÁü¤òÀßÄꤷ¤Þ¤¹¡£¤Þ¤¿¤³¤ÎÇطʲèÁü¾å¤Ë¥²¡¼¥àÆâ¤Ç³ÍÆÀ¤·¤¿¥¹¥³¥¢¤È¾Ã¤·¤¿´³»Ù¤Î¹ç·×¿ô¤òɽ¼¨¤·¤Þ¤¹¡£
¡¡ResultPopUp¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÁªÂò¤·¡¢¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤ò³Îǧ¤·¤Þ¤¹¡£RectTransfrom¥³¥ó¥Ý¡¼¥Í¥ó¥È¡¢¤¢¤ë¤¤¤ÏScene¥Ó¥å¡¼Æâ¤Ç°ÌÃÖ¤òÂ礤µ¤òÄ´À°¤·¤Þ¤¹¡£
²èÁü¤ò»²¹Í¤Ë¡ÊºÙ¤«¤¤¿ô»ú¤ÏŬµ¹ÀÚ¤ê¾å¤²¤Æ¤¯¤À¤µ¤¤¡Ë¡¢Canvas¤ÈƱ¤¸Â礤µ¤Ë¤·¤Æ¡¢²èÌ̤ξåÉô¤Ë¥²¡¼¥à²èÌ̤«¤é±£¤ì¤ë¤è¤¦¤ËÇÛÃÖ¤·¤Æ¤ª¤¤¤Æ¤¯¤À¤µ¤¤¡£
¡¡¤Ä¤Å¤¤¤ÆImage¥³¥ó¥Ý¡¼¥Í¥ó¥È¤ÎSourceImage¤Ë¡¢¥ê¥¶¥ë¥Èɽ¼¨¤ÎÇطʤȤʤë²èÁü¤òÀßÄꤷ¤Þ¤¹¡£
¤³¤³¤Ç¤Ï̵ÎÁ²èÁü¤òõ¤·¤Æ¤¤Æ¥¤¥ó¥Ý¡¼¥È¤·¤ÆÍøÍѤ·¤Æ¤¤¤Þ¤¹¤¬¡¢²èÁü¤Ï¼«Í³¤ËÀßÄꤷ¤Æ¤¯¤À¤µ¤¤¡£¡Ê´³»Ù¤Ë¹ç¤ï¤»¤Æ³¨ÇϤΥ¤¥á¡¼¥¸¤Ë¤·¤Æ¤¤¤Þ¤¹¡Ë
¡¡¹ç¤ï¤»¤ÆImage¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Ë¤¢¤ë Raycast Target ¤Î¥Á¥§¥Ã¥¯¤ò³°¤·¤Þ¤¹¡£
ResultPopUp¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
![](https://image02.seesaawiki.jp/i/o/i-school-memo/H4Dy4MjCYR-s.png)
ResultPopUp¡¡ÇÛÃÖ
![](https://image02.seesaawiki.jp/i/o/i-school-memo/4qE5eSDKuw-s.png)
ResultPopUp¡¡ÇÛÃÖ
![](https://image02.seesaawiki.jp/i/o/i-school-memo/FqopQOGRV5-s.png)
¡¡°ÊÁ°ºîÀ®¤·¤Æ¤¢¤ë TextBasePrefab ¤ò¤³¤³¤Ç¤âÍøÍѤ·¤Þ¤¹¡£ResultPopUp¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤È¤·¤Æ¥É¥é¥Ã¥°¥¢¥ó¥É¥É¥í¥Ã¥×¤·¤ÆÇÛÃÖ¤·¤Æ¤¯¤À¤µ¤¤¡£
̾Á°¤ò txtTitle ¤ËÊѹ¹¤·¤Þ¤¹¡£¤³¤ÎÉôʬ¤Ï¥ê¥¶¥ë¥Èɽ¼¨¤Î¥¿¥¤¥È¥ë¥á¥Ã¥»¡¼¥¸¤Îɽ¼¨¤ò¹Ô¤¤¤Þ¤¹¡£
¡¡txtTitle¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÁªÂò¤·¡¢¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤ò³Îǧ¤·¤Þ¤¹¡£RectTransfrom¥³¥ó¥Ý¡¼¥Í¥ó¥È¡¢¤¢¤ë¤¤¤ÏScene¥Ó¥å¡¼Æâ¤Ç°ÌÃÖ¤òÂ礤µ¤òÄ´À°¤·¤Þ¤¹¡£
²èÁü¤ò»²¹Í¤Ë¤·¤Æ¤¯¤À¤µ¤¤¡£¡ÊºÙ¤«¤¤¿ô»ú¤ÏŬµ¹ÀÚ¤ê¾å¤²¤Æ¤¯¤À¤µ¤¤¡Ë
¡¡Text¥³¥ó¥Ý¡¼¥Í¥ó¥ÈÆâ¤ÎTextÍó¤Ë¥¿¥¤¥È¥ë¤È¤Ê¤ëʸ»úÎó¤òÀßÄꤷ¤Þ¤¹¡£¤³¤³¤Ç¤Ï "·ë²Ìȯɽ" ¤È¤¤¤¦Ê¸»úÎó¤òɽ¼¨¤µ¤»¤Æ¤¤¤Þ¤¹¤¬¡¢Å¬µ¹Êѹ¹¤·¤Æ¤¯¤À¤µ¤¤¡£
txtTitle¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
![](https://image02.seesaawiki.jp/i/o/i-school-memo/0q43KheJtG-s.png)
txtTitle¡¡Scene¥Ó¥å¡¼²èÁü
![](https://image02.seesaawiki.jp/i/o/i-school-memo/pTe_PdL3yM-s.png)
¡¡¤·¤Ð¤é¤¯Æ±¤¸¼ê½ç¤¬Â³¤¤Þ¤¹¡£ResultPopUp¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤È¤·¤Æ TextBasePrefab ¤òÇÛÃÖ¤·¤Æ¤¯¤À¤µ¤¤¡£
̾Á°¤ò txtScore ¤ËÊѹ¹¤·¤Þ¤¹¡£¤³¤ÎÉôʬ¤Ï¥²¡¼¥àÆâ¤Ç³ÍÆÀ¤·¤¿¥¹¥³¥¢¤ò¥²¡¼¥à¤Î·ë²Ì¤È¤·¤Æɽ¼¨¤·¤Þ¤¹¡£
¡¡txtScore¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÁªÂò¤·¡¢¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤ò³Îǧ¤·¤Þ¤¹¡£RectTransfrom¥³¥ó¥Ý¡¼¥Í¥ó¥È¡¢¤¢¤ë¤¤¤ÏScene¥Ó¥å¡¼Æâ¤Ç°ÌÃÖ¤òÂ礤µ¤òÄ´À°¤·¤Þ¤¹¡£
²èÁü¤ò»²¹Í¤Ë¤·¤Æ¤¯¤À¤µ¤¤¡£¡ÊºÙ¤«¤¤¿ô»ú¤ÏŬµ¹ÀÚ¤ê¾å¤²¤Æ¤¯¤À¤µ¤¤¡Ë
¡¡Text¥³¥ó¥Ý¡¼¥Í¥ó¥ÈÆâ¤ÎTextÍó¤Ë¥¿¥¤¥È¥ë¤È¤Ê¤ëʸ»úÎó¤òÀßÄꤷ¤Þ¤¹¡£¤³¤³¤Ç¤Ï "000000" ¤È¤¤¤¦Ê¸»úÎó¤òɽ¼¨¤µ¤»¤Æ¤¤¤Þ¤¹¡£
¤³¤ì¤Ïʸ»úÎó¤ÎºÇÂç¿ô¤ò³Îǧ¤¹¤ë¤È¤È¤â¤Ë¡¢DoTween¤Îµ¡Ç½¤Ë¤è¤Ã¤Æ¥¹¥³¥¢É½¼¨¤ò¥¢¥Ë¥á¡¼¥·¥ç¥ó¤µ¤»¤ë¤¿¤á¤Ç¤¹(¥¹¥³¥¢¤¬°ì½Ö¤Çɽ¼¨¤µ¤ì¤ë¤Î¤Ç¤Ï¤Ê¤¯¡¢¥É¥é¥à¼°¤Î¤è¤¦¤ËÆ°¤¯)
txtScore¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
![](https://image01.seesaawiki.jp/i/o/i-school-memo/Ots_nZUYm6-s.png)
txtScore¡¡Scene¥Ó¥å¡¼²èÁü
![](https://image01.seesaawiki.jp/i/o/i-school-memo/hJx6373nAJ-s.png)
¡¡ResultPopUp¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤È¤·¤Æ TextBasePrefab ¤òÇÛÃÖ¤·¤Æ¤¯¤À¤µ¤¤¡£
̾Á°¤ò lblScore ¤ËÊѹ¹¤·¤Þ¤¹¡£¤³¤ÎÉôʬ¤Ï¥²¡¼¥àÆâ¤Ç³ÍÆÀ¤·¤¿¥¹¥³¥¢¤Î¥é¥Ù¥ëÉôʬ¤Ç¤¹¡£
¡¡lblScore¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÁªÂò¤·¡¢¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤ò³Îǧ¤·¤Þ¤¹¡£RectTransfrom¥³¥ó¥Ý¡¼¥Í¥ó¥È¡¢¤¢¤ë¤¤¤ÏScene¥Ó¥å¡¼Æâ¤Ç°ÌÃÖ¤òÂ礤µ¤òÄ´À°¤·¤Þ¤¹¡£
²èÁü¤ò»²¹Í¤Ë¤·¤Æ¤¯¤À¤µ¤¤¡£¡ÊºÙ¤«¤¤¿ô»ú¤ÏŬµ¹ÀÚ¤ê¾å¤²¤Æ¤¯¤À¤µ¤¤¡Ë
¡¡Text¥³¥ó¥Ý¡¼¥Í¥ó¥ÈÆâ¤ÎTextÍó¤Ë¥¿¥¤¥È¥ë¤È¤Ê¤ëʸ»úÎó¤òÀßÄꤷ¤Þ¤¹¡£¤³¤³¤Ç¤Ï "¥¹¥³¥¢ : " ¤È¤¤¤¦Ê¸»úÎó¤òɽ¼¨¤µ¤»¤Æ¤¤¤Þ¤¹¡£
¤³¤Î lblScore ¤Ë¾ï¤Ë ¥¹¥³¥¢ ¤Èɽ¼¨¤µ¤ì¤Æ¤¤¤ë¤¿¤á¡¢txtScore ¤Ç¤Ï¿ô»ú¤Î¤ß¤òɽ¼¨¤¹¤ì¤Ð¤è¤¤¤è¤¦¤ËÀ߷פ·¤Æ¤¤¤Þ¤¹¡£
lblScore¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
![](https://image01.seesaawiki.jp/i/o/i-school-memo/qde6SMcvsh-s.png)
lblScore¡¡Scene¥Ó¥å¡¼²èÁü
![](https://image02.seesaawiki.jp/i/o/i-school-memo/qwZn3q04f9-s.png)
ResultPopUp¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤È¤·¤Æ¡¢TextBasePrefab¤òÇÛÃÖ¤·¡¢txtEraseEtoCount¤Ë̾Á°¤òÊѤ¨¤ë ![](https://static.seesaawiki.jp/img/usr_second/common/icon_pen.gif)
¡¡ResultPopUp¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤È¤·¤Æ TextBasePrefab ¤òÇÛÃÖ¤·¤Æ¤¯¤À¤µ¤¤¡£
̾Á°¤ò txtEraseEtoCount ¤ËÊѹ¹¤·¤Þ¤¹¡£¤³¤ÎÉôʬ¤Ï¥²¡¼¥àÆâ¤Ç¾Ã¤·¤¿´³»Ù¤ÎÁí¿ô¤ò¥²¡¼¥à¤Î·ë²Ì¤È¤·¤Æɽ¼¨¤·¤Þ¤¹¡£
¡¡txtEraseEtoCount¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÁªÂò¤·¡¢¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤ò³Îǧ¤·¤Þ¤¹¡£RectTransfrom¥³¥ó¥Ý¡¼¥Í¥ó¥È¡¢¤¢¤ë¤¤¤ÏScene¥Ó¥å¡¼Æâ¤Ç°ÌÃÖ¤òÂ礤µ¤òÄ´À°¤·¤Þ¤¹¡£
²èÁü¤ò»²¹Í¤Ë¤·¤Æ¤¯¤À¤µ¤¤¡£¡ÊºÙ¤«¤¤¿ô»ú¤ÏŬµ¹ÀÚ¤ê¾å¤²¤Æ¤¯¤À¤µ¤¤¡Ë
¡¡Text¥³¥ó¥Ý¡¼¥Í¥ó¥ÈÆâ¤ÎTextÍó¤Ë¥¿¥¤¥È¥ë¤È¤Ê¤ëʸ»úÎó¤òÀßÄꤷ¤Þ¤¹¡£¤³¤³¤Ç¤Ï "000000" ¤È¤¤¤¦Ê¸»úÎó¤òɽ¼¨¤µ¤»¤Æ¤¤¤Þ¤¹¡£
¤³¤ì¤Ïʸ»úÎó¤ÎºÇÂç¿ô¤ò³Îǧ¤¹¤ë¤È¤È¤â¤Ë¡¢DoTween¤Îµ¡Ç½¤Ë¤è¤Ã¤Æ¥¹¥³¥¢É½¼¨¤ò¥¢¥Ë¥á¡¼¥·¥ç¥ó¤µ¤»¤ë¤¿¤á¤Ç¤¹
txtEraseEtoCount¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
![](https://image01.seesaawiki.jp/i/o/i-school-memo/Cxltg4rqWr-s.png)
txtEraseEtoCount¡¡Scene¥Ó¥å¡¼²èÁü
![](https://image01.seesaawiki.jp/i/o/i-school-memo/Xek0HsqQH2-s.png)
ResultPopUp¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤È¤·¤Æ¡¢TextBasePrefab¤òÇÛÃÖ¤·¡¢lblEraseEtoCount¤Ë̾Á°¤òÊѤ¨¤ë ![](https://static.seesaawiki.jp/img/usr_second/common/icon_pen.gif)
¡¡ResultPopUp¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤È¤·¤Æ TextBasePrefab ¤òÇÛÃÖ¤·¤Æ¤¯¤À¤µ¤¤¡£
̾Á°¤ò lblEraseEtoCount ¤ËÊѹ¹¤·¤Þ¤¹¡£¤³¤ÎÉôʬ¤Ï¥²¡¼¥àÆâ¤Ç³ÍÆÀ¤·¤¿¥¹¥³¥¢¤ò¥²¡¼¥à¤Î·ë²Ì¤È¤·¤Æɽ¼¨¤·¤Þ¤¹¡£
¡¡lblEraseEtoCount¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÁªÂò¤·¡¢¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤ò³Îǧ¤·¤Þ¤¹¡£RectTransfrom¥³¥ó¥Ý¡¼¥Í¥ó¥È¡¢¤¢¤ë¤¤¤ÏScene¥Ó¥å¡¼Æâ¤Ç°ÌÃÖ¤òÂ礤µ¤òÄ´À°¤·¤Þ¤¹¡£
²èÁü¤ò»²¹Í¤Ë¤·¤Æ¤¯¤À¤µ¤¤¡£¡ÊºÙ¤«¤¤¿ô»ú¤ÏŬµ¹ÀÚ¤ê¾å¤²¤Æ¤¯¤À¤µ¤¤¡Ë
¡¡Text¥³¥ó¥Ý¡¼¥Í¥ó¥ÈÆâ¤ÎTextÍó¤Ë¥¿¥¤¥È¥ë¤È¤Ê¤ëʸ»úÎó¤òÀßÄꤷ¤Þ¤¹¡£¤³¤³¤Ç¤Ï "¾Ã¤·¤¿´³»Ù¤Î¿ô : " ¤È¤¤¤¦Ê¸»úÎó¤òɽ¼¨¤µ¤»¤Æ¤¤¤Þ¤¹¡£
¤³¤ì¤â¥¹¥³¥¢¤Î»þ¤ÈƱÍͤǡ¢¾ï¤Ë¾Ã¤·¤¿´³»Ù¤Î¿ô¤Èɽ¼¨¤µ¤ì¤Æ¤¤¤ë¤¿¤á¡¢txtEraseEtoCount ¤Ç¤Ï¿ô»ú¤Î¤ß¤òɽ¼¨¤¹¤ì¤Ð¤è¤¤¤è¤¦¤ËÀ߷פ·¤Æ¤¤¤Þ¤¹¡£
lblEraseEtoCount¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
![](https://image01.seesaawiki.jp/i/o/i-school-memo/DLnlz7gDvI-s.png)
lblEraseEtoCount¡¡Scene¥Ó¥å¡¼²èÁü
![](https://image01.seesaawiki.jp/i/o/i-school-memo/JfEny8Cg7D-s.png)
ResultPopUp¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤È¤·¤ÆButton¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÄɲä·¡¢btnClosePopUp¤Ë̾Á°¤òÊѤ¨¤ë ![](https://static.seesaawiki.jp/img/usr_second/common/icon_pen.gif)
¡¡Canvas¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î¾å¤Ç±¦¥¯¥ê¥Ã¥¯¤ò¹Ô¤¤¡¢UI => Button ¤òÁªÂò¤·¡¢¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òºîÀ®¤·¤Þ¤¹¡£Ì¾Á°¤ò btnClosePopUp ¤ËÊѹ¹¤·¤Þ¤¹¡£
¤Þ¤¿»Ò¥ª¥Ö¥¸¥§¥¯¥È¤È¤·¤ÆText¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬°ì½ï¤ËÄɲ䵤ì¤Þ¤¹¤¬¡¢¤³¤Á¤é¤Ïºï½ü¤·¤Æ¤¯¤À¤µ¤¤¡£
¡¡btnClosePopUp¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ç¤Ï¡¢¥ê¥¶¥ë¥È»þ¤Î²èÌ̤Υ¿¥Ã¥×¤ò¸¡ÃΤ·¤Æ¡¢¥ê¥¶¥ë¥Èɽ¼¨¤ò½ªÎ»¤·¤Æ¡¢¥²¡¼¥à¤òºÆ¥¹¥¿¡¼¥È¤µ¤»¤Þ¤¹¡£¤Þ¤¿¡¢ÇطʲèÁü¤òÀßÄꤷ¤Þ¤¹¡£
¡¡btnClosePopUp¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÁªÂò¤·¡¢¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤ò³Îǧ¤·¤Þ¤¹¡£RectTransfrom¥³¥ó¥Ý¡¼¥Í¥ó¥È¡¢¤¢¤ë¤¤¤ÏScene¥Ó¥å¡¼Æâ¤Ç°ÌÃÖ¤òÂ礤µ¤òÄ´À°¤·¤Þ¤¹¡£
²èÁü¤ò»²¹Í¤Ë¡ÊºÙ¤«¤¤¿ô»ú¤ÏŬµ¹ÀÚ¤ê¾å¤²¤Æ¤¯¤À¤µ¤¤¡Ë¡¢ResultPopUp¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ÈƱ¤¸Â礤µ¤Ë¤·¤Æ¤ª¤¤¤Æ¤¯¤À¤µ¤¤¡£
(¥²¡¼¥à²èÌ̤ΤɤÎÉôʬ¤ò¥¿¥Ã¥×¤·¤Æ¤â¸¡ÃΤǤ¤ë¤è¤¦¤Ë¤¹¤ë¤¿¤á¤Ç¤¹¡£)
¡¡¼¡¤ËCanvasRenderer¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Î Cull Transparent Mesh ¥Á¥§¥Ã¥¯¤òÆþ¤ì¤Þ¤¹¡£µ¡Ç½¤ÎÀâÌÀ¤Ï¸å¤Ç¹Ô¤¤¤Þ¤¹¡£
¡¡¤Ä¤Å¤¤¤ÆImage¥³¥ó¥Ý¡¼¥Í¥ó¥È¤ÎSourceImage¤Ë¡¢¥Ü¥¿¥óɽ¼¨¤ÎÇطʤȤʤë²èÁü¤òÀßÄꤷ¤Þ¤¹¡£
¤³¤³¤Ç¤Ï̵ÎÁ²èÁü¤òõ¤·¤Æ¤¤Æ¥¤¥ó¥Ý¡¼¥È¤·¤ÆÍøÍѤ·¤Æ¤¤¤Þ¤¹¤¬¡¢²èÁü¤Ï¼«Í³¤ËÀßÄꤷ¤Æ¤¯¤À¤µ¤¤¡£
»²¹Í²èÁü¤Î¾ì¹ç¤Ï¥ê¥¶¥ë¥È¤Î³¨ÇϤβèÁü¤Ë¤«¤Ö¤é¤Ê¤¤¤è¤¦¤Ë¡¢²èÌ̤ξåÉô¤È²¼Éô¤Î¤ß¤Î²èÁü¤òÍÑ°Õ¤·¤Æ¤¤¤Þ¤¹¡£¡Ê²èÌÌÃæ±ûÉÕ¶á¤ÏÆ©ÌÀ¡Ë
¡¡
¡¡ºÇ¸å¤Ë Add Component ¤ò²¡¤·¤Æ¡¢ CanvasGroup¥³¥ó¥Ý¡¼¥Í¥ó¥È¤òÄɲä·¤Þ¤¹¡£ÀßÄê¤Ï¤½¤Î¤Þ¤Þ¤ÇÌäÂꤢ¤ê¤Þ¤»¤ó¡£
btnClosePopUp¡¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
![](https://image02.seesaawiki.jp/i/o/i-school-memo/fK3NXSGMXS-s.png)
btnClosePopUp¢¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
![](https://image01.seesaawiki.jp/i/o/i-school-memo/fPUsunSLBi-s.png)
btnClosePopUp¡¡¡Scene¥Ó¥å¡¼²èÁü
![](https://image02.seesaawiki.jp/i/o/i-school-memo/4mc3pv7g7O-s.png)
¡¡¤³¤ÎCanvasGroup¥³¥ó¥Ý¡¼¥Í¥ó¥È¤¬¥¢¥¿¥Ã¥Á¤µ¤ì¤Æ¤¤¤ë¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤È¡¢¤½¤Î»Ò¤Î¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬¥°¥ë¡¼¥×²½¤µ¤ì¤Þ¤¹¡£
¤³¤ì¤Ë¤è¤ê¡¢¥°¥ë¡¼¥×Á´ÂΤÎÆ©ÌÀÅÙ¤òÊѹ¹¤·¤¿¤ê¤¹¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£
¡¡º£²ó¤ÏbtnClosePopUp¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ËCanvasGroup¥³¥ó¥Ý¡¼¥Í¥ó¥È¤ò¥¢¥¿¥Ã¥Á¤·¤Æ¤¤¤Þ¤¹¡£
¤½¤Î¤¿¤á¤³¤Î¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤Ç¤¢¤ëimgMessageBG¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ÈtxtMesssage¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤È¤¬¥°¥ë¡¼¥×²½¤µ¤ì¤Þ¤¹¡£
Æ©ÌÀÅÙ(Alpha)¤òÁàºî¤·¤¿¾ì¹ç¤ÎÆ°²è¡¡¥°¥ë¡¼¥×²½¤µ¤ì¤Æ¤¤¤ë¤¿¤á¡¢»ÒÍ×ÁǤâ°ì½ï¤ËÆ©ÌÀ¤Ë¤Ê¤Ã¤¿¤ê¡¢¸µ¤ËÌá¤Ã¤¿¤ê¤·¤Þ¤¹¡£
CanvasGroup¥³¥ó¥Ý¡¼¥Í¥ó¥È¡¡AlphaÁàºî¤ÎÆ°²è
https://gyazo.com/43d616ddbd36b95d9b58ef0364a558a6
Unity¸ø¼°¥Þ¥Ë¥å¥¢¥ë
CanvasGroup
https://docs.unity3d.com/ja/2020.1/Manual/class-Ca...
TechProjinÍÍ
¡ÚUnity¡ÛCanvas Group¤Ã¤Æ¤³¤ó¤Ê¤ËÊØÍø¤À¤Ã¤¿¤Î¤«¡Ä
https://tech.pjin.jp/blog/2017/03/20/unity_ugui_ca...
¡¡¤³¤Îµ¡Ç½¤ò¥ª¥ó¤Ë¤¹¤ë¤È¡¢Æ©ÌÀ¤Ê¥ª¥Ö¥¸¥§¥¯¥È¤ÎÉÁ²è¤ò¥¹¥¥Ã¥×¤Ç¤¤Þ¤¹¡£
¡¡Unity¤Ç¤Ï¥ª¥Ö¥¸¥§¥¯¥È¤òÆ©ÌÀ¤Ë¤·¤¿¾ì¹ç¡¢Æ©ÌÀ¤Ê¾õÂÖ¤òÉÁ²è¤·¤Æ¤¤¤ë¤³¤È¤Ë¤Ê¤ê¤Þ¤¹¡£¤½¤Î¤¿¤á¡¢ÉÁ²è¤ÎÉé²Ù¤¬Ä̾ï¤è¤ê¤â¹â¤¯¤Ê¤ê¤Þ¤¹¡£
Æ©ÌÀ¤ÊÉÁ²è¤ò¹Ô¤¦É¬Íפ¬¤¢¤ë¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ë¤Ä¤¤¤Æ¤Ï¡¢¤³¤Î Cull Transparent Mesh µ¡Ç½¤òÍøÍѤ·¤Æ¤¯¤À¤µ¤¤¡£
¡¡º£²ó¤ÏbtnClosePopUp¤È¤½¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤Î£²¤Ä¤Ë¤Ä¤¤¤Æ¤³¤Îµ¡Ç½¤òÍøÍѤ·¤Æ¤¤¤Þ¤¹¡£
Unity¸ø¼°¥¹¥¯¥ê¥×¥È¥ê¥Õ¥¡¥ì¥ó¥¹
Canvas Renderer
https://docs.unity3d.com/ja/current/ScriptReferenc...
¥³¥¬¥Í¥Ö¥í¥°ÍÍ
¡ÚUnity¡ÛuGUI ¤Ç Canvas Renderer ¤Î¡ÖCull Transparent Mesh¡×¤ò¥ª¥ó¤Ë¤¹¤ë¤ÈÆ©ÌÀ¤Ê¥ª¥Ö¥¸¥§¥¯¥È¤ÎÉÁ²è¤ò¥¹¥¥Ã¥×¤Ç¤¤ë
https://baba-s.hatenablog.com/entry/2019/03/18/152...
btnClosePopUp¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤È¤·¤ÆImage¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÄɲä·¡¢imgMessageBG¤Ë̾Á°¤òÊѤ¨¤ë ![](https://static.seesaawiki.jp/img/usr_second/common/icon_pen.gif)
¡¡btnClosePopUp¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î¾å¤Ç±¦¥¯¥ê¥Ã¥¯¤ò¹Ô¤¤¡¢UI => Image ¤òÁªÂò¤·¡¢¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òºîÀ®¤·¤Þ¤¹¡£Ì¾Á°¤ò imgMessageBG ¤ËÊѹ¹¤·¤Þ¤¹¡£
²èÌÌ¥¿¥Ã¥×¤òÂ¥¤¹¥á¥Ã¥»¡¼¥¸¤ÎÇطʲèÁü¤òÀßÄꤹ¤ëÉôʬ¤Ç¤¹¡£
¡¡
¡¡imgMessageBG¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÁªÂò¤·¡¢¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤ò³Îǧ¤·¤Þ¤¹¡£RectTransfrom¥³¥ó¥Ý¡¼¥Í¥ó¥È¡¢¤¢¤ë¤¤¤ÏScene¥Ó¥å¡¼Æâ¤Ç°ÌÃÖ¤òÂ礤µ¤òÄ´À°¤·¤Þ¤¹¡£
²èÁü¤ò»²¹Í¤ËŬµ¹¤ÊÂ礤µ¤Ë¤·¤ÆÀßÄꤷ¤Æ¤¯¤À¤µ¤¤¡£
¡¡¼¡¤ËCanvasRenderer¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Î Cull Transparent Mesh ¥Á¥§¥Ã¥¯¤òÆþ¤ì¤Þ¤¹¡£
¡¡ºÇ¸å¤ËImage¥³¥ó¥Ý¡¼¥Í¥ó¥È¤ÎSourceImage¤Ë¡¢¥¿¥Ã¥×¥á¥Ã¥»¡¼¥¸¤ÎÇطʤȤʤë²èÁü¤òÀßÄꤷ¤Þ¤¹¡£
¤³¤³¤Ç¤Ï²èÁü¤ÎÀßÄê¤Ï¤»¤º¤Ë¡¢Color ¤ÎÀßÄ꤫¤é¿§¤ÈÆ©ÌÀÅ٤ΤߤòÊѹ¹¤·¤Æ»ÈÍѤ·¤Æ¤¤¤Þ¤¹¡£²èÁü¤Ï¼«Í³¤ËÀßÄꤷ¤Æ¤¯¤À¤µ¤¤¡£
¡¡
imgMessageBG¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
![](https://image01.seesaawiki.jp/i/o/i-school-memo/736okXgwuj-s.png)
imgMessageBG¡¡Scene¥Ó¥å¡¼²èÁü
![](https://image01.seesaawiki.jp/i/o/i-school-memo/XxBRMKgeak-s.png)
imgMessageBG¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤È¤·¤ÆTextBasePrefab¤òÀßÃÖ¤·¡¢txtMessage¤Ë̾Á°¤òÊѤ¨¤ë ![](https://static.seesaawiki.jp/img/usr_second/common/icon_pen.gif)
¡¡imgMessageBG¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤È¤·¤Æ TextBasePrefab ¤òÇÛÃÖ¤·¤Æ¤¯¤À¤µ¤¤¡£(btnClosePopUp¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤«¤é¸«¤Æ¡¢Â¹¤Î°ÌÃÖ)
̾Á°¤ò txtMessage ¤ËÊѹ¹¤·¤Þ¤¹¡£¤³¤ÎÉôʬ¤Ï¼¡¤Î¥²¡¼¥à¤ÎºÆ³«¤òÂ¥¤¹¥á¥Ã¥»¡¼¥¸¤òɽ¼¨¤µ¤»¤ëÉôʬ¤Ç¤¹¡£
¡¡txtMessage¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÁªÂò¤·¡¢¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤ò³Îǧ¤·¤Þ¤¹¡£RectTransfrom¥³¥ó¥Ý¡¼¥Í¥ó¥È¡¢¤¢¤ë¤¤¤ÏScene¥Ó¥å¡¼Æâ¤Ç°ÌÃÖ¤òÂ礤µ¤òÄ´À°¤·¤Þ¤¹¡£
²èÁü¤ò»²¹Í¤Ë¤·¤Æ¤¯¤À¤µ¤¤¡£¡ÊºÙ¤«¤¤¿ô»ú¤ÏŬµ¹ÀÚ¤ê¾å¤²¤Æ¤¯¤À¤µ¤¤¡Ë
¡¡Text¥³¥ó¥Ý¡¼¥Í¥ó¥ÈÆâ¤ÎTextÍó¤Ë¥¿¥¤¥È¥ë¤È¤Ê¤ëʸ»úÎó¤òÀßÄꤷ¤Þ¤¹¡£¤³¤³¤Ç¤Ï "²èÌ̤ò¥¿¥Ã¥×¤¹¤ë¤ÈºÆ¥¹¥¿¡¼¥È¡ª" ¤È¤¤¤¦Ê¸»úÎó¤òɽ¼¨¤µ¤»¤Æ¤¤¤Þ¤¹¡£
txtMessage¡¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
![](https://image02.seesaawiki.jp/i/o/i-school-memo/43weoPnCnu-s.png)
txtMessage¢¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
![](https://image02.seesaawiki.jp/i/o/i-school-memo/4gur7Fn5Hc-s.png)
txtMessage¡¡Scene¥Ó¥å¡¼²èÁü
![](https://image02.seesaawiki.jp/i/o/i-school-memo/Kcs5ZdHOU3-s.png)
ResultPopUp¡¡´°À®²èÁü
![](https://image01.seesaawiki.jp/i/o/i-school-memo/D3u_0bN5sB-s.png)
¡¡ResultPopUp¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÁªÂò¤·¤Æ¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤ò³Îǧ¤·¤Þ¤¹¡£
RectTransfrom¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Î Top ¤È Bottom ¤ÎÃͤò¤É¤Á¤é¤â 0 ¤ËÀßÄꤷ¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡£
ResultPopUp¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
![](https://image02.seesaawiki.jp/i/o/i-school-memo/y5W1294B8v-s.png)
¤³¤ÎÁàºî¤ò¹Ô¤Ã¤¿¤È¤¤Ë¡¢ResultPopUp¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬¥²¡¼¥à²èÌ̤ξå¤Ë¤Ô¤Ã¤¿¤ê¤È¤Ï¤Þ¤ì¤ì¤Ð´°À®¤Ç¤¹¡£
¡¡
»²¹Í²èÁü(¥²¡¼¥à²èÌ̾å¤ËResultPopUp¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬ÇÛÃÖ¤µ¤ì¤Æ¤¤¤ë)
![](https://image01.seesaawiki.jp/i/o/i-school-memo/nqBxxNtNEN-s.png)
¡¡¼¡¤Î¼ê½ç¤Ç¤Ï¥²¡¼¥à½ªÎ»¤Ë¹ç¤ï¤»¤Æ²èÌ̾åÉô¤ËÇÛÃÖ¤·¤¿ResultPopUp¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ò¥¹¥é¥¤¥É¤·¤Æ¡¢¥²¡¼¥à²èÌ̾å¤Ëɽ¼¨¤µ¤»¤Æ¤¤¤¤Þ¤¹¡£
¡¡°Ê¾å¤Ç¤³¤Î¼ê½ç¤Ï½ªÎ»¤Ç¤¹¡£
¡¡¼¡¤Ï ¼ê½ç£±£³ ¤Ç¤¹¡£
- ¥«¥Æ¥´¥ê¡§
- ¿Ê³Ø/¥¹¥¯¡¼¥ë
- ¥×¥í¥°¥é¥ß¥ó¥°
¥³¥á¥ó¥È¤ò¤«¤¯