My game has a main menu scene and the options in the menu reuses scenes that have an initialization string to customize the scene.
if (GUILayout.Button (items*.label)) {*
_ PlayerPrefs.SetString(“TaskCode”, items*.taskcode);_
_ Application.LoadLevel(items.levelname);
}*
If I load the scene manually rather than using the main menu scene it uses the last saved instance of “TaskCode” - even if it is meant to be used for a different scene because it stays saved between games.
Ideally I want “TaskCode” in PlayerPrefs to clear when the game first starts then if the other scene is loaded with no value for “TaskCode” it would use a default value set based on the scene._