Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

how to store some variables on the device in unity

//Example using the PlayerPrefs system to store integers on the local device storage
//Writing data
PlayerPrefs.SetInt("myPref", 5);
//Reading data
myint = PlayerPrefs.GetInt("myInt");
Source by forum.unity.com #
 
PREVIOUS NEXT
Tagged: #store #variables #device #unity
ADD COMMENT
Topic
Name
6+6 =