Implemented OnApplicationPause on the Unity side to handle pause/focus events