1 using System;
2 using System.Collections;
3 using System.Collections.Generic;
4 using System.IO;
5 using UnityEngine;
6 using UnityEngine.Networking;
7 using UnityEngine.UI;
8
9 public class DataWriteAndRead: MonoBehaviour
10 {
11 //文本内容
12 string infoall;
13 void Start()
14 {
15 //android、ios、PC都可以: Application.persistentDataPath +"/FileName.txt"
16
17 //删除文件
18 DeleteFile(Application.persistentDataPath, "FileName.txt");
19 //创建文件,写入数据
20 CreateFile(Application.persistentDataPath, "FileName
Unity之数据本地写入和读取
最新推荐文章于 2024-06-28 09:47:05 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)