OnApplicationPause issue

So I have seen many threads on how to get it working but on my case it is more how to get it working in a consistent manner.

Here is the layout:

private void OnApplicationPause(bool value)
{
      Debug.Log("OnApplication Pause " + value );
       if(value == false && Application.loadedLevelName != "StartScene")
       {
            Debug.Log("OnResume");
       }
}

The object on which this is attached has a DontDestroyOnLoad and it is in the scene, I can see it. It is also a direct MonoBehaviour.

This happens to work in the second scene but once I move to the third, done, won’t work again. Getting back to second scene and what was previously working is no more…So to sum it up it only works as long as I stay in scene two.

In order to test, I simply click another application.

Run in background is not set on.

Using 4.6.2 and cannot move to 5 nor 4.6.2+ for plugin reasons.

Any idea?

EDIT: This seems to be an Editor issue since it works fine on iOS.

Make sure RunInBackground is off in the PlayerSettings

In order to test, I simply click another application.

Run in background is not set on.

Using 4.6.2 and cannot move to 5 nor 4.6.2+ for plugin reasons.