Version: 5.3 (switch to 5.4b)
언어English
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

PlayerPrefs.Save

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

닫기

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

닫기

취소

Switch to Manual
public static function Save(): void;
public static void Save();

Description

수정된 모든 preferences를 디스크에 씁니다.

기본설정으로 유니티는 Application Quit시에 preference를 디스크에 씁니다. 게임이 갑자기 종료되는 경우를 위해서, 게임의 적절한 'checkpoints'에서 PlayerPrefs를 저장하고 싶을 것입니다. 이 함수는 잠재적으로 발생하는 작은 랙(lack) 같은 현상을 디스크에 저장하기 때문에, 실제 게임 플레이중에 함수를 호출 할 것을 권장합니다. This function will write to disk potentially causing a small hiccup, therefore it is not recommended to call during actual gameplay.

Note: There is no need to call this function manually inside OnApplicationQuit().

Note: On Windows Store Apps and Windows Phone 8.1 preferences are saved during application suspend, because there's no application quit event.