PlayerPrefs.Save 保存

static function Save () : void

Description描述

Writes all modified preferences to disk.

写入所有修改参数到硬盘。

By default Unity writes preferences to disk on Application Quit. In case when the game crashes or otherwise prematuraly exits, you might want to write the PlayerPrefs at sensible 'checkpoints' in your game. This function will write to disk potentially causing a small hiccup, therefore it is not recommended to call during actual gameplay.

默认Unity在程序退出时保存参数。在游戏崩溃或过早退出时,想要在游戏中写入玩家设置到合理的“检查点”。这个函数将写入到硬盘,游戏可能有稍微的停顿,因此它不建议在实际游戏中调用。

Page last updated: 2012-5-27