Hi guys,
I’m trying to make a main menu with a loadlastscene option,
I got a new method for the saving wrapper which is:
public void LoadFromMenu()
{
LoadLastScene();
}
which is:
public IEnumerator LoadLastScene()
{
yield return GetComponent().LoadLastScene(defultSaveFile);
Fader fader = FindObjectOfType();
fader.FadeOutImmediate();
yield return fader.FadeIn(fadeInTime);
}
(the 1’s are on purpose haha)
and the UI button has an on click for this:
public void OnClickMouse()
{
GetComponent().LoadFromMenu();
}
even though the simplicity, it doesn’t work…
tells me a "NullReferenceException: Object reference not set to an instance of an object
Load.OnClickMouse () "
I guess the problem is the save file is null (the file does exist of course), and I couldn’t find how to change it…
broke my head about it quite a lot but couldn’t find an answer… please help:)
thanks in advanced!