Hello,
I am using the ArrayPrefs2 script from wiki (PlayerPrefsX.js). When I’m trying to save some strings in an array I get the following error.
“NullReferenceException: Object reference not set to an instance of an object
PlayerPrefsX.SetStringArray (System.String key, System.String stringArray) (at Assets/Standard Assets/Scripts/PlayerPrefsX.js:175)”
Here’s the line what I’m using:
PlayerPrefsX.SetStringArray ("Diary_text_1", diary.story_text);
- story_text is a string array (
var story_text = new String[21];) where I want to store some strings and what I want to save.
Does anyone has any idea what could be the problem here? Thanks in advance.