15571人加入学习
(100人评价)
通过实例学习:游戏的存档与读档(Unity 2017.2)

制作完成于2018-1-12

价格 免费

1.通过关键字存储PlayerPrefs.SetInt( )

直接存储int等数据类型的数据

获取数值PlayerPrefs.GetInt( )

[展开全文]

PlayerPrefs:数据持久化方案

采用键值对的方式对数据进行存储

可以存储int float string类型的数据

PlayerPrefs.SetInt("index",1);

PlayerPrefs.SetFloat("Height",183.5f);

PlayerPrefs.SetString("Name","Tom");

获取数据

PlayerPrefs.GetInt("Index");

[展开全文]

PlayerPrefs.SetInt("score",100);

Float height=183.5f;

 

[展开全文]

授课教师

SIKI学院老师

课程特色

图文(1)
下载资料(1)
视频(34)

学员动态

chhhb 开始学习 33-总结
chhhb 加入学习