Skip to content

porhuat/PlayerPrefsTutorials

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PlayerPrefsTutorials

This is unity's PlayerPrefs example is also my learning record, there are any questions welcome to communicate with me to learn!

Unity Version

2022.2.6f1

Static Methods

Command Description
DeleteAll Removes all keys and values from the preferences. Use with caution.
DeleteKey Removes the given key from the PlayerPrefs. If the key does not exist, DeleteKey has no impact.
GetFloat Returns the value corresponding to key in the preference file if it exists.
GetInt Returns the value corresponding to key in the preference file if it exists.
GetString Returns the value corresponding to key in the preference file if it exists.
HasKey Returns true if the given key exists in PlayerPrefs, otherwise returns false.
Save Saves all modified preferences.
SetFloat Sets the float value of the preference identified by the given key. You can use PlayerPrefs.GetFloat to retrieve this value.
SetInt Sets a single integer value for the preference identified by the given key. You can use PlayerPrefs.GetInt to retrieve this value.
SetString Sets a single string value for the preference identified by the given key. You can use PlayerPrefs.GetString to retrieve this value.

About

Unity PlayerPrefs Tutorials Sample

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published