Unity Application front and back switch call relationship

normal feed:

Normal entry means clicking on the app to enter

OnApplicationFocus, isFocus=True

Normal return:

Normal exit means click the back button of the mobile phone to exit

OnApplicationQuit

Home out:

Home out refers to entering the runtime program list by operating the homt key, or returning to the desktop by pressing the home key

Please add image description

OnApplicationPause, isPause=True

OnApplicationFocus, isFocus=False

HomeInto:

Enter via the runtime program list

OnApplicationPause, isPause=False

OnApplicationFocus, _isFocus=True

Kill process:

Simply exit the program by pressing the back button

Double-click Home for the current application, then Kill:

OnApplicationQuit (IOS has callback, android has no callback)

Jump out of the current application, then Kill:

Remove programs from the runtime program list

OnApplicationQuit (both IOS and Android have no callback)

Guess you like

Origin blog.csdn.net/weixin_43149049/article/details/127354403