unity : 環境判定、他言語化 i18n

* 適当です。

アイテムの名前程度ですが、日本語と英語で切り替えようと

http://docs.unity3d.com/Documentation/ScriptReference/Application-systemLanguage.html

Application.systemLanguage.ToString();
無事、EnglishやJapaneseが出ました

Japaneseのときだけ日本語表示にしたいと思います。

データ系はとりあえずjsonで作成するので


{
"text": {
"hello": {
"en":"hello",
"ja":"はろー"
}
},
"items": {
"item_id" : {
"name": {
"en": "apple",
"ja":"りんご"
}
}
}

で適当に表示させてみます。

別の話。
NullReferenceException: (null)
UnityEditor.SerializedObject..ctor (UnityEngine.Object[] objs)
UnityEditor.AssetImporterInspector.GetSerializedObjectInternal ()
UnityEditor.Editor.get_serializedObject ()
UnityEditor.ModelImporterClipEditor.OnEnable ()

削除したりすると出るらしい unityを一度閉じると治るようです。

This entry was posted on 木曜日, 4月 10th, 2014 at 12:45 PM and is filed under unity. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Unityによるゲームを公開しております iOS/Android
https://itunes.apple.com/jp/app/lost-knight-3d-action/id900917032
https://play.google.com/store/apps/details?id=com.groundroad.runknight

各種開発支援・機能開発等小さいお仕事などもお請けしております。
unity開発支援, PHPシステム開発, javascript/html5 フロント開発, titanium mobileアプリ開発
お気軽にお問い合わせください
大崎・五反田近郊での対面でのお打ち合わせはいつでも可能です。