Android - embedding Unity3d scene in activity - need to unregister receiver?

后端 未结 1 1275
春和景丽
春和景丽 2021-01-02 11:02

I\'ve been a SO member for a while but never actually asked a question, so here goes..

My Aim

I\'m trying to make an Android app with two activities. The f

1条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-02 11:21

    So, I did some more searching and eventually found an answer, right here on SO!

    As discussed in this answer, adding this line to the manifest fixes the problem;

    android:process=":UnityKillsMe"
    

    so the relevant part of the manifest looks like this;

    ...
    
    
    
         
        
    
    ...
    

    This forces the gameplay activity to launch in a separate process. This means you can call m_UnityPlayer.quit() in the activity's onDestroy method without the whole app closing.

    Simple fix, but annoying that it seems to be completely undocumented.

    Hope this helps someone!

    0 讨论(0)
提交回复
热议问题