Hi,
I am saving to PlayerPrefs as follows:
using UnityEngine;
using System.Collections;
using System.Text;
using UnityEditor;
[ExecuteInEditMode]
public class PlayerPrefsTest : MonoBehaviour {
[MenuItem ("GameObject/TestPrefs")]
static void TestPrefs()
{
PlayerPrefs.SetString("testInfo","test four");
}
}
Although I can run this from the menu and on the face of it, it runs fine it does not save to PlayerPrefs.
If I go into play mode and run it from the menu it saves fine, no issues.
Is it correct then that you can only save to PlayerPrefs if you are in play mode even from a MenuItem script and ExecuteInEdit mode ?
thanks