NGUI ã§æåãæç»ããå ´åã«ã¯ Unity ãæ¨æºã§ä½¿ãããã©ã³ããã¡ã¤ã«ã«ããæç»ã¯ä½¿ãã¾ããã NGUI ã§ã¯ãããããããã©ã³ããä½æåºæ¥ããã¼ã«ãªã©ã使ã£ã¦ãããããããã©ã³ããä½æãããã®ãããããããã©ã³ãã使ã£ã¦æåãæç»ãã¾ãã
ãã®è¨äºã§ã¯ Glyph Designer 㧠NGUI åãã®ãããããããã©ã³ããä½ãæ¹æ³ã解説ãã¾ããããã¾ã§ä¸ä¾ã§ãã®ã§ãå®éã«ä½æ¥ããæã«ã¯ã²ã¼ã ã®é°å²æ°ãªã©ã«åããé©å®èª¿æ´ãã¦ä½¿ç¨ãã¦ä¸ããã
ãããããããã©ã³ãã®ä½æ
ã¾ãã¯ä½¿ç¨ãããã©ã³ããé¸æãã¾ããä»åã¯ãHiragino Kaku Gothic Proããé¸æããäºã«ãã¾ããæ¤ç´¢ã¦ã£ã³ãã¦ã§æ¤ç´¢ããã¨ä¾¿å©ã§ãã
次ã«ãã©ã³ããµã¤ãºã®å¤æ´ãã¦ã£ã³ãã¦ã®å·¦ä¸ã«æãã¹ã©ã¤ãã¼ã移åããã¨èª¿æ´åºæ¥ã¾ããä»åã¯20ã«è¨å®ãã¾ããä¸åº¦è¯ãä½ç½®ã«æ¢ã¾ããªãå ´åã¯ã¹ã©ã¤ãã¼ã®å·¦å³ã«æããAããã¿ã³ãæ¼ãã¨1ã¤ã¥å æ¸åºæ¥ã¾ãã
ããã¦ããããã以ä¸ã®èµ¤æ ã®ç®æãå¤æ´ã
ãIncluded Glyphsãã§ã¯ãããããããã©ã³ãã«å«ããæåãè¨å®ãã¾ããããã«è¨è¼ããã¦ããæåãããããããã«å«ãããã¾ãããã®çºãå«ãããæåã®ä¸è¦§ãæºåããå¿
è¦ãæãã¾ããこちらã« Shift JIS ã«å«ã¾ããæåã®ä¸è¦§ãæºåãã¾ããã®ã§ãã¡ãããã³ãããã¦ä¸ããã
å³é¸ãããæ¼¢åã ããå«ããå ´å
ãªãããã§ä½¿ã£ã Shift JIS ã«å«ã¾ããæåã®ä¸è¦§ã§ä½æããå ´åã¯å®éã«Unityã§è¡¨ç¤ºããæã«åãæåãµã¤ãºã§ä½ã£ã ASCII ã®ç¯å²ã ãã®ãã®ã¨è¦æ¯ã¹ã㨠Shift JIS ã®ä¸è¦§ã使ã£ãæ¹ã¯æåãã¼ããã¦ãã¾ãã¾ããã
ã ASCII ãããã Shift JIS ã
ããããã対象ã¨ãªãæåæ°ãå¤ãããã®ãåå ã§ã¯ç¡ããã¨æãã¾ã(確å®ãªåå ã¯çªãæ¢ãããã¦ãã¾ãã)ã(â»åå ãåããã¾ããã詳細ã¯å¥éè¨è¿°)ããã§æ¬å½ã«ä¸»è¦ãªãã®ã ãã®æåä¸è¦§ã¯ç¡ããã¨èããæã id:dearna ããã® Selected U3D Japanese Font ã®äºãæãåºãã¾ããããã¡ãã§ã¯æ¼¢åã®é¨åã¯ãå°å¦æ ¡ï¼å¹´çã¾ã§ã®æè²æ¼¢åããé½éåºç表è¨ãã²ã¼ã ç¨èªã«é©ããæ¼¢åãã¨æ¬å½ã«ä½¿ç¨é »åº¦ãé«ãã¨æããããã®ã ããé¸æããã¦ãã¾ãããã¡ã㯠Unity ã® Asset Store ã§ãé
å¸ããã¦ãã¾ãããµã¤ãã®æ¹ã§ã¯ããåé²ãã¦ããæ¼¢åãæ¹è¯ããããã®ãç½®ããã¦ããã®ã§ãã¡ããããã¦ã³ãã¼ãããæ¹ãè¯ãã§ãããã
Selected U3D Japanese Font - 俺ããã£ããé¨ã ï¼
http://d.hatena.ne.jp/dearna/20110419/1303207066
ç¾å¨ã¯ u3dfont102.unitypackage (2011/05/19) ã¨ãããã®ãææ°ã§ãã®ã§ãããå ã«æåã®ä¸è¦§ãåå¾ããæ¹æ³ãæ¸ãã¦ããã¾ãã
ãã®ããã±ã¼ã¸ã®ä¸ã® SU3DJPFont/list.txt ã¨ããã®ã該å½ã®ãã¡ã¤ã«ã§ããä»åã¯ããã ããã¤ã³ãã¼ããã¾ãã
ãã®ãã¡ã¤ã«ãããã«ã¯ãªãã¯ãã¦ã¨ãã£ã¿ã«è¡¨ç¤ºãããã®ããã¡ãã«æãã¾ãã
ãããè¦ãã¨ã³ã¡ã³ããæ¸ããã¦ãã¾ããã³ã¡ã³ãã§ä½¿ã£ã¦ãããã®ã¯ä½¿ç¨ããæåã®ä¸è¦§ã«å«ã¾ãã¦ããæåã§ãã®ã§ããã®ã¾ã¾å
¨é¨ã³ãããã¦åé¡æãã¾ããããªãã Glyph Designer ã§ã¯åãæåãè¤æ°æã£ã(ä¾ãã°è²¼ãä»ããããã¹ãã®ä¸ã« A ã3ã¤æããªã©)ã¨ãã¦ããããããããã©ã³ãã«ã¯ãã®æåã¯1ã¤ããæ ¼ç´ããã¾ããã
ãããããã®ä¸è¦§ã使ã£ãå ´åã«ã¯ã©ããã¦ãå³é¸ãããæ¼¢åã ããæ¡ç¨ããã¦ããé¢ä¿ã§ãä¾ãã°ãè¦çç¿å¼æ³ã使ããããå¾ãªããã¨ããå°ã
ãããã¢ãã¯ãªæ¼¢åãå«ã¾ããããã¹ãã使ãã¨Unityä¸ã§ã¯åé²ããã¦ããªãæåã¯çç¥ãããçã使ããããå¾ãªããã¨è¡¨ç¤ºããã¦ãã¾ãã¾ãã
ãã¡ãããããç¨åº¦ä½¿ããããªæ¼¢åãåãã£ã¦ããå ´åã«ã¯ãããã®æ¼¢åã追å ããäºã§å¯¾å¿ãå¯è½ã§ããããããå®å
¨ã«ã©ã®æ§ãªæåã使ããããäºæ³åºæ¥ãªãå ´åã«ã¯ãã®æ¹æ³ã¯ä½¿ãã¾ããã
åãæ¢ããããã§ã¯ Shift JIS ã«å«ã¾ããæåã®ä¸è¦§ã使ã£ãã¨ãã¦è©±ãé²ãã¾ãã
次ã«ãUpdateããã¿ã³ãæ¼ãã¨ãã¬ãã¥ã¼ç»é¢ãæ´æ°ãããã®ã§ããããã®å¦çãããªãéãã§ããè±èªã ã¨æåæ°ãå°ãªãçºãç´ãã«çµããã®ã§æ°ã«ãªãã¾ãããæ¥æ¬èªã®æ§ã«æåæ°ãå¤ãå ´åã¯ã¨ã¦ãå¦çãéãã§ãã
ãã³ã°ã¢ãããããã®æ§ãªç¶æ ã«ãªããä»ã® Glyph Designer 以å¤ã®ã¢ããªã®åä½ã極端ã«éããªãã¾ããåæã«ä»ã®ä½æ¥ãè¡ãã¯ããã¦ãããæ¹ãè¯ãã§ãããã
å¦çæéã¯ãã·ã³ã®ã¹ããã¯ã«ããã¾ãã2ã10åç¨åº¦ã§çµãããã¨æãã¾ãã
è¨å®ã¯ä»¥ä¸ã§çµäºã§ããç»é¢å³ä¸ã®ãExportããã¿ã³ãæ¼ãã¦ããããããããã©ã³ããåºåãã¾ãããã
ä»åã¯ãã®æ§ãªè¨å®ã¨ãã¡ã¤ã«åã§åºåãã¾ãã
â»ãã®å¦çãå°ã
ãæéããããã¾ãã
ããã§ã¯ãExport typeãã« EZ GUI Text ãé¸æãã¦ãã¾ãããã¡ãã®è¨å®ã§åºåãããã®ã¯ NGUI ã§ãå©ç¨å¯è½ã§ãã
ãã㧠font.png 㨠font.txt ã¨ãã2ã¤ã®ãã¡ã¤ã«ãåºåãããã¯ãã§ãã font.png ããããããããã©ã³ãã®ç»åãã¡ã¤ã«ã§ font.txt ãæåã®ä½ç½®æ å ±ãªã©ãä¿åãããã¡ã¤ã«ã¨ãªãã¾ãã
NGUI åãã«å¤æ
1. Unity ãèµ·åããæ°è¦ããã¸ã§ã¯ããä½æãã NGUI ãã¤ã³ãã¼ããã¾ãã
2. font.png 㨠font.txt ã Project ãã¥ã¼ã«ãã©ãã°ãã¦è¿½å ãã¾ãã
(追è¨)
Shift JIS ã«å«ã¾ããæåã ã¨è¡¨ç¤ºãã¼ãããåé¡ã®è§£æ±ºæ¹æ³ã
ããã§è¿½å ãã font.png ã Unity ä¸ã§é¸æãããã¯ã¹ãã£ã® Inspector ã®ãMax Sizeãã 2048 ã«å¤æ´ãã¦ããApplyããã¿ã³ãæ¼ãã¾ãã
ããã§ã¼ãããªãæ§ã«æãã¾ããã¼ãããåå ã¨ãã¦ã¯ãããããããã©ã³ãã®ç»åãµã¤ãºã 2048x2048 ã«ãé¢ããããããã®è¨å®ãããã©ã«ã㧠1024 ã«ãªã£ã¦ããçºã«ã¼ããã¦ãã¾ã£ã¦ããæ§ã§ãã
(追è¨ããã¾ã§)
3. ã¡ãã¥ã¼ãããNGUIãâãFont Makerããé¸æãã¾ãã
表示ãããã¦ã£ã³ãã¦ã®ãFont Dataãã®é
ç®ã«ã¯æ¸é¡ã®ã¢ã¤ã³ã³ã®ä»ãã¦ããæ¹ã® font ããã©ãã°ãã¾ããä¸ã®ãTextureãã«ã¯ããä¸ã¤ã® font ããã©ãã°ãã¾ãããFont NameãããMainFontãã«å¤æ´ãã¦ãCreate a Font without an Atlasããã¿ã³ãæ¼ãã¾ãããã®ãã¿ã³ã表示ããã¦ããªãå ´åã«ã¯ã¦ã£ã³ãã¦ã®ç¸¦ã®é·ããé·ããã¦ã¿ã¦ä¸ããã
ãã®ä½æ¥ã§ãããªã¢ã«ã¨ Prefab ã追å ããã¾ãã
ãã㧠NGUI åãã®ãã©ã³ãã®ä½æãå®äºã§ããä»ã¾ã§ NGUI ã«ä»å±ãã¦ãããSciFi Font - HeaderãããSciFi Font - Normalãã®å¤ããã«ä»åä½æãã Profab(MainFont) ãé¸æããã¨å©ç¨å¯è½ã§ãã
Tips
ããã§ãã©ã³ãã®è²ãããã©ã«ãã®é»ããç½ã«å¤æ´ããã®ã«ã¯ã¡ããã¨çç±ãæãã¾ãã
ãããããããã©ã³ãã®è²ãç½ã 㨠UILabel ãªã©ã®ãColor Tintãã®é
ç®ã®è²ãå¤æ´ããã¨ãã©ã³ãã®è²ããã®è²ã«å¤æ´ããäºãå¯è½ã ããã§ãã
é»ã ã¨ããã®è¨å®ãåæ ãããã常ã«é»ã§æç»ããã¾ããé»ä»¥å¤ã§ä½¿ãäºå®ãç¡ãå ´åã§ããã°ããã©ã«ãã®é»ã®ã¾ã¾ã§ãåé¡æãã¾ããã
é¢é£æ å ±
NGUI åãã®ãããããããã©ã³ããä½æåºæ¥ãã¢ããªä¸è¦§ - å¼·ç«ã§é²ã
http://d.hatena.ne.jp/nakamura001/20120908/1347136958