hch
2023-11-19 f95ccf240c48c97c54e8f09e386d56a2cf5fffc9
0312 同步最新unity版本的UnityPlayerActivity.java
3个文件已修改
26 ■■■■ 已修改文件
Channel/Android/mlgtgame/debug/libs/library-debug-mlgtgame.aar 补丁 | 查看 | 原始文档 | blame | 历史
Channel/Android/mlgtgame/release/libs/library-release-mlgtgame.aar 补丁 | 查看 | 原始文档 | blame | 历史
SdkProject/library/src/main/java/com/secondworld/sdk/UnityPlayerActivity.java 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Channel/Android/mlgtgame/debug/libs/library-debug-mlgtgame.aar
Binary files differ
Channel/Android/mlgtgame/release/libs/library-release-mlgtgame.aar
Binary files differ
SdkProject/library/src/main/java/com/secondworld/sdk/UnityPlayerActivity.java
@@ -4,12 +4,14 @@
import android.app.Activity;
import android.content.Intent;
import android.content.res.Configuration;
import android.graphics.PixelFormat;
import android.os.Bundle;
import android.os.Process;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.os.Process;
import com.unity3d.player.IUnityPlayerLifecycleEvents;
import com.unity3d.player.UnityPlayer;
@@ -39,8 +41,8 @@
        getIntent().putExtra("unity", cmdLine);
        mUnityPlayer = new UnityPlayer(this, this);
//        setContentView(mUnityPlayer);
//        mUnityPlayer.requestFocus();
        setContentView(mUnityPlayer);
        mUnityPlayer.requestFocus();
    }
    // When Unity player unloaded move task to background
@@ -70,6 +72,22 @@
        super.onDestroy();
    }
    // If the activity is in multi window mode or resizing the activity is allowed we will use
    // onStart/onStop (the visibility callbacks) to determine when to pause/resume.
    // Otherwise it will be done in onPause/onResume as Unity has done historically to preserve
    // existing behavior.
    @Override protected void onStop()
    {
        super.onStop();
        mUnityPlayer.pause();
    }
    @Override protected void onStart()
    {
        super.onStart();
        mUnityPlayer.resume();
    }
    // Pause Unity
    @Override protected void onPause()
    {