Android Internet permission in Unity

后端 未结 1 1050
悲&欢浪女
悲&欢浪女 2021-01-12 23:24

It seems like by default Unity doesn\'t put




        
相关标签:
1条回答
  • 2021-01-12 23:53

    Go to Edit->Project Settings -> Player. Select Android, Build Settings, Change Internet Access from Auto to Require. You don't have to do this because Unity will do for automatically when you use any network API.

    If that's not enough for you then you can modify the Android AndroidManifest by hand.

    1. Open Unity. Build your project for Android just once. Don't close it.

    2. Go to your Project Directory. A new Folder called Temp will be created by Unity after step 1. Inside that Temp there is another Folder called StagingArea. Go into the StagingArea folder and copy a file called AndroidManifest.xml into another folder in your computer. Modify/Add your own custom permission like the ones in your question.

    3. Now move that modified AndroidManifest.xml file to Your Project Directory->Assets->Plugins->Android. If the Plugins and the Android Folders does not exit, create them.

    Enjoy!

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