Unity3D IOS 下保存和读取资源(保存到文件夹目录) Posted on 2025 年 07 月 08 日 by U3d / Unity3D 脚本/插件 /被围观 33 次 001002using UnityEngine;003004using System
Collections;005006using System
IO;007008using System;009010011public class NvTestSave : MonoBehaviour012013{01401501601private string showtext = "not txt has been loaded
";7018019020021public string JsonPath022023 {024025 get{026027 string path=null;028029 if(Application
platform==RuntimePlatform
IPhonePlayer)030031 {032033 path= Application
dataPath
Substring (0, Application
dataPath
Length - 5);034035 path = path
Substring(0, path
LastIndexOf('/'))+"/Documents/";036037 }038039 else040041 {042043 path=Application
dataPath+"/Resource/GameData/";044045 }046047 return path;048049 }050051 }052053054055// Use this for initialization056057void Start ()058059{0600