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

¡¡¥¹¥Þ¥Û¤Î²èÌ̤βòÁüÅÙ¤ÏüËö¤´¤È¤ËÊѤï¤ë¤¿¤á¡¢¥²¡¼¥à¤Î UI Éôʬ¤Ë¤Ä¤¤¤Æ¤Ï²òÁüÅ٤˱þ¤¸¤¿°ÌÃ֤ȥµ¥¤¥º¤ËÊѹ¹¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
¤Þ¤¿¡¢°ìÉô¤ÎüËö¤Ï²èÌÌÆâ¤Ë¥Î¥Ã¥ÁÉôʬ¡¢iPhone14Pro °Ê¹ß¤Ë¤Ï¥À¥¤¥Ê¥ß¥Ã¥¯¥¢¥¤¥é¥ó¥É¤¬¤¢¤ê¤Þ¤¹¡£
¤³¤ì¤é¤ÎÉôʬ¤Ë UI ¤¬½Å¤Ê¤Ã¤Æ¤·¤Þ¤ï¤Ê¤¤¤è¤¦¤ËÂбþ¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¤³¤Î UI ¤¬°ÂÁ´¤ËÇÛÃ֤Ǥ­¤ëÉôʬ¤ò SafeArea(¥»¡¼¥Õ¥¨¥ê¥¢)¤È¤¤¤¤¤Þ¤¹¡£

¡¡ÌµÎÁ¥¢¥»¥Ã¥È¤òÍøÍѤ¹¤ë¤³¤È¤Ç¡¢UI ¤¬½Å¤Ê¤é¤Ê¤¤¤è¤¦¤Ê SafeArea Âбþ¤¬½ÐÍè¤Þ¤¹¡£



SafeAreaHelper ¥¢¥»¥Ã¥È¤Î¥¤¥ó¥Ý¡¼¥È


¡¡¥¢¥»¥Ã¥È¥¹¥È¥¢¤Ë¤Æ SafeArea ¤Ç¸¡º÷¤¹¤ë¤«¡¢²¼µ­¤Î¥ê¥ó¥¯¤«¤é SafeAreaHelper ¥¢¥»¥Ã¥È¤ò¥À¥¦¥ó¥í¡¼¥É¤·¤Æ Unity ¤Ë¥¤¥ó¥Ý¡¼¥È¤·¤Þ¤¹¡£

UnityAssetStore
SafeAreaHelper
https://assetstore.unity.com/packages/tools/gui/sa...





¡¡¥¤¥ó¥Ý¡¼¥È¤¹¤ë¤È¡¢¡ÖAssets/CrystalFramework/¡×¥Õ¥©¥ë¥À¤¬ºîÀ®¤µ¤ì¤Þ¤¹¡£
¤³¤ÎÃæ¤Ë SafeArea ¥¹¥¯¥ê¥×¥È¤¬´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£


Canvas ¤È SafeArea ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ÎºîÀ®


¡¡Canvas £±¤Ä¤ËÂФ·¤Æ¡¢£±¤Ä¤Î SafeArea ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òºîÀ®¤·¤ÆÇÛÃÖ¤·¤Þ¤¹¡£

¡¡Î㤨¤Ð¡¢£³¤Ä¤Î Canvas ¤¬Â¸ºß¤·¤Æ¤¤¤ë¾ì¹ç¡¢¤½¤ì¤¾¤ì¤Î Canvas ¤Ë¤Ä¤¤¤Æ Create Empty ¤ò¹Ô¤¤¡¢
¿·¤·¤¤»Ò¥ª¥Ö¥¸¥§¥¯¥È¤òºîÀ®¤·¤Þ¤¹¡£Ì¾Á°¤ò SafeArea ¤ËÊѹ¹¤·¤Þ¤¹¡£
¤¤¤Þ¤Þ¤Ç¸ºß¤·¤Æ¤¤¤¿ UI ¤Î¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ï¡¢¤³¤Î SafeArea ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤ËÆþ¤ì¤Þ¤¹¡£

¡¡¥Ò¥¨¥é¥ë¥­¡¼¤Ï²¼µ­¤Î¤è¤¦¤Ê·Á¤Ë¤Ê¤ê¤Þ¤¹¡£

¡¡Canvas
¡¡¡¡- SafeArea¡¡¡¡//¡¡¢«¡¡Canvas ¤È¾¤Î UI ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î´Ö¤Ë¶´¤à
¡¡¡¡¡¡¡¡- ³Æ UI ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È·²
¡¡¡¡¡¡¡¡- ³Æ UI ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È·²



¡¡Î㤨¤Ð¡¢Canvas ¤¬£²¤Ä¤¢¤Ã¤¿¾ì¹ç¤Ë¤Ï¡¢²¼µ­¤Î¤è¤¦¤Ê·Á¤Ë¤Ê¤ê¤Þ¤¹¡£

¡¡Canvas_A
¡¡¡¡- SafeArea¡¡¡¡//¡¡¢«¡¡Canvas ¤È¾¤Î UI ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î´Ö¤Ë¶´¤à
¡¡¡¡¡¡¡¡- ³Æ UI ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È·²
¡¡¡¡¡¡¡¡- ³Æ UI ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È·²
¡¡Canvas_B
¡¡¡¡- SafeArea¡¡¡¡//¡¡¢«¡¡Canvas ¤È¾¤Î UI ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î´Ö¤Ë¶´¤à
¡¡¡¡¡¡¡¡- ³Æ UI ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È·²
¡¡¡¡¡¡¡¡¡¡¡¡- ³Æ UI ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È·²
¡¡¡¡¡¡¡¡¡¡¡¡- ³Æ UI ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È·²
¡¡¡¡¡¡¡¡- ³Æ UI ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È·²

¡¡¤³¤Î¤è¤¦¤ÊʤӤˤ·¤Æ¡¢¤¹¤Ù¤Æ¤Î UI ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ï¡¢SafeArea ¤Î²¼¤ËÇÛÃÖ¤µ¤ì¤ë¤è¤¦¤Ë¤·¤Þ¤¹¡£

¡¡¤½¤ÎºÝ¤Î¿Æ»Ò´Ø·¸¤Ï°ÊÁ°¤Î¤Þ¤Þ¤ÇÌäÂꤢ¤ê¤Þ¤»¤ó¤Î¤Ç¡¢Ê̤θÀ¤¤Êý¤ò¤¹¤ë¤È
¤¤¤Þ¤Þ¤Ç¤Î UI ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤È Canvas ¤È¤Î´Ö¤Ë SafeArea ¤ò´Ö¤ËÆþ¤ì¤ÆÇÛÃÖ¤¹¤ë·Á¤Ë¤Ê¤ê¤Þ¤¹¡£


¥µ¥ó¥×¥ë²èÁü



SafeArea ¥¹¥¯¥ê¥×¥È¤ò¥¢¥¿¥Ã¥Á¤¹¤ë


¡¡¤³¤Î³Æ SafeArea ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ë SafeArea ¥¹¥¯¥ê¥×¥È¤ò¥¢¥¿¥Ã¥Á¤·¤Þ¤¹¡£
£²¤Ä¤Î SafeArea ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬¤¢¤ë¤Ê¤é¡¢¤½¤ì¤é¤Ë£±¤Ä¤º¤Ä¡¢SafeArea ¥¹¥¯¥ê¥×¥È¤ò¥¢¥¿¥Ã¥Á¤·¤Þ¤¹¡£


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



¡ãSafeArea ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î Anchor ¤òÀßÄꤹ¤ë¡ä


¡¡ºÇ¸å¤Ë SafeArea ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î Anchor ¤òÀßÄꤷ¤Þ¤¹¡£

¡¡¥Ò¥¨¥é¥ë¥­¡¼¤Îʤӽç¤È¤È¤â¤Ë½ÅÍפʤΤϡ¢¤³¤Î Anchor ¤ÎÀßÄê¤Ç¤¹¡£stretch : stretch ¤ÎÀßÄê¤Ë¤·¤Æ¤¯¤À¤µ¤¤¡£
¤³¤ÎÀßÄê¤Ë¤¹¤ë¤³¤È¤Ë¤è¤ê¡¢SafeArea ¥¹¥¯¥ê¥×¥È¤Ë¤è¤Ã¤Æ¡¢SafeArea ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î¥µ¥¤¥º¤¬²òÁüÅ٤˱þ¤¸¤Æ²ÄÊѤ·¤Þ¤¹¡£
¤½¤ì¤Ë¹ç¤ï¤»¤Æ»Ò¥ª¥Ö¥¸¥§¥¯¥È¤ËÇÛÃÖ¤µ¤ì¤Æ¤¤¤ë UI ¤Î¥ª¥Ö¥¸¥§¥¯¥È·²¤â SafeArea ÆâÉô¤Ë¼ý¤Þ¤ë¤è¤¦¤ËÇÛÃÖ¤µ¤ì¤Þ¤¹¡£

¡¡¤½¤Î¤¿¤á¡¢SafeArea ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î¥¢¥ó¥«¡¼¤Ï stretch : stretch ¤ÇÀßÄꤷ¤Þ¤¹¡£

¡¡¤³¤ÎÀßÄê¤Î¾ì¹ç¡¢³Æ¥µ¥¤¥º¤Ï¤¹¤Ù¤Æ 0 ¤ÇÌäÂꤢ¤ê¤Þ¤»¤ó¡£


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



Game ¥Ó¥å¡¼¤Ç¥µ¥¤¥º¤òÊѤ¨¤Æ³Îǧ¤¹¤ë


¡¡FreeAspect ¤ËÊѹ¹¤·¡¢¼«Í³¤Ê²èÌÌ¥µ¥¤¥º¤ËÊѹ¹¤·¤Þ¤¹¡£
¤³¤Î¤È¤­¡¢SafeArea ¤¬µ¡Ç½¤¹¤ë¤³¤È¤Ç¡¢²èÌÌÆâ¤Î UI ¤¬¼ý¤Þ¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£

¡¡¤Þ¤¿ simulator ¤âÍøÍѤ·¤Æ¡¢ÁÛÄꤷ¤Æ¤¤¤ëüËö¤Î²èÌÌ¥µ¥¤¥º¤Ç¤â³Îǧ¤ò¤·¤Æ¤ª¤­¤Þ¤¹¡£


¡ã»²¹Í¥µ¥¤¥È¡ä



Unity ¸ø¼°¥Þ¥Ë¥å¥¢¥ë
´ðËÜŪ¤Ê¥ì¥¤¥¢¥¦¥È
https://docs.unity3d.com/ja/current/Manual/UIBasic...
Unity ¸ø¼°¥Þ¥Ë¥å¥¢¥ë
¥¢¥ó¥«¡¼
https://docs.unity3d.com/ja/2017.1/Manual/windowsh...
¥Ï¥ë¥·¥ª¥ó¥·¥¹¥Æ¥à ÍÍ
¡Ú¥Ï¥ë¥·¥ª¥ó¥Ö¥í¥°¡ÛSafeAreaHelper¤Î»È¤¤Êý¡£SafeAreaÆâ¤Ç¥²¡¼¥à¤òºî¤í¤¦¡ª
http://halcyonsystemblog.jp/blog-entry-973.html

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


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

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

Menu


´ðÁÃ

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

private



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

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