In Windows, the configuration file is stored in the application. datapath directory. The configuration file is edited and passes the test. Failed to read after publishing as exe. Later, the configuration file will be placed under the generated _ data file and passed.
Of course, I want to release it to other platforms in the future. persistentdatapath is the place where the mobile terminal can save and generate files. It cannot be changed after being packaged in the resource and placed in the application. the China Mobile Terminal in datapath has no access permission. We recommend that you store the files to be modified in the application. persistentdatapath Directory, which is useful for both Android and IOS.
In this way, your file users can see it.
Application. Datapath
Unity Editor: <path TP project folder>/assets
Mac PLAYER: <path to player app bundle>/Contents
IPhone PLAYER: <path to player app bundle>/<appname. app>/Data
Win PLAYER: <path to executablename_data folder>
Web player: the absolute URL to the player data file folder (without the actual data file name)
Application. Persistentdatapath
Macro definition
# If unity_iphone
Application. datapath + ''/iPhone /';
# Endif
# If unity_android
Application. datapath + ''/Android /';
# Endif
Unity3d game engine IOS Android supports reading and writing Chinese and local files
Directory for reading local files on Unity platforms