关于Unity自动为安卓添加权限
Posted wolf96
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了关于Unity自动为安卓添加权限相关的知识,希望对你有一定的参考价值。
某些代码会使Unity自动添加安卓权限 https://docs.unity3d.com/Manual/android-manifest.htmlUnity automatically adds the necessary permissions to the Manifest based on the Player Settings and Unity APIs that your app calls from the script. For example:
- Network classes add the INTERNET permission
- Using vibration (such as Handheld.Vibrate) adds VIBRATE
- The InternetReachability property adds ACCESS_NETWORK_STATE
- Location APIs (such as LocationService) adds ACCESS_FINE_LOCATION
- WebCamTexture APIs add CAMERA permission
- The Microphone class adds RECORD_AUDIO
参考: https://forum.unity.com/threads/androidmanifest-implicit-dangerous-permissions.458602/
ACCESS_FINE_LOCATION permission can come from: - Input.location API calls https://docs.unity3d.com/ScriptReference/Input-location.html - your plugins having the permission in the manifest or calling this API.
参考: https://forum.unity.com/threads/unity-5-1-adds-android-permission-read_phone_state-automatically-how-to-remove-it.333431/#post-2216754
--by wolf96 2018/1/24
以上是关于关于Unity自动为安卓添加权限的主要内容,如果未能解决你的问题,请参考以下文章