!!!リソースとしてText(TextAsset)を取得 「[[リソースとしてObjectを取得|unity_script_get_resources_object]]」で、 「TextAsset」を取得することでテキストファイルを読み込むことができます。 Unityのプロジェクトで、 Assets xxxx.unity [Scripts] [Resources] <== コレ [text] hoehoe.txt のように「Resource」フォルダを作成し、この中にテキストファイルを格納しておきます。 !!リソースの読み込み TextAsset t = Resources.Load("text/hoehoe", typeof(TextAsset)) as TextAsset; のようにするとテキストの読み込み。拡張子は指定しません。 string str = t.text; に文字列が格納されています。なお、テキストは読み取り専用です。 ---- {{lastmodified}}