コガネブログ

平日更新を目標に Unity や C#、Visual Studio、ReSharper などのゲーム開発アレコレを書いていきます

【Unity】【I2 Localization】「Error saving file XXXX」

アセット

概要

Error saving file 'XXXX/LangSource_I2Languages_Chinese/Sim.loc'
System.IO.IsolatedStorage.IsolatedStorageException: Could not find a part of the path "XXXX\LangSource_I2Languages_Chinese\Sim.loc".
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x001f9] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/FileStream.cs:290 
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0 
  at System.IO.StreamWriter..ctor (System.String path, Boolean append, System.Text.Encoding encoding, Int32 bufferSize) [0x00039] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/StreamWriter.cs:124 
  at System.IO.StreamWriter..ctor (System.String path, Boolean append, System.Text.Encoding encoding) [0x00000] in <filename unknown>:0 
  at System.IO.File.WriteAllText (System.String path, System.String contents, System.Text.Encoding encoding) [0x00000] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/File.cs:626 
  at I2.Loc.I2BasePersistentStorage.SaveFile (eFileType fileType, System.String fileName, System.String data, Boolean logExceptions) [0x00025] in YYYY\Localization\Scripts\Configurables\PersistentStorage.cs:201 

「I2 Localization」を使用した Unity プロジェクトで
PC プラットフォーム向けにビルドしたところ
言語変更時に上記のエラーが発生する状況に遭遇しました

f:id:baba_s:20180827172044p:plain

原因としては、言語の識別子に「/」を使っていたことだったので
「/」を使わないようにしたところエラーが発生しなくなりました