void OnApplicationFocus( bool isFocus )
{
if( isFocus )
{
Debug.Log("返回到游戏");//回到游戏
}
else
{
Debug.Log("离开游戏");//切出游戏
}
}
unity自动响应方法名对了就行
void OnApplicationFocus( bool isFocus )
{
if( isFocus )
{
Debug.Log("返回到游戏");//回到游戏
}
else
{
Debug.Log("离开游戏");//切出游戏
}
}
unity自动响应方法名对了就行