Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

Save variable unity

//set any string value
PlayerPrefs.SetString("varName", "any string info here");

//Get any string value
Text.text = PlayerPrefs.GetString("varName", "if nothing found this text return");

PlayerPrefs.SetFloat
PlayerPrefs.SetInt

PlayerPrefs.GetFloat
PlayerPrefs.GetInt
 
PREVIOUS NEXT
Tagged: #Save #variable #unity
ADD COMMENT
Topic
Name
6+2 =