您的位置:首页 > 移动开发 > Unity3D

关于Unity自动为安卓添加权限

2018-01-24 15:36 351 查看
某些代码会使Unity自动添加安卓权限
https://docs.unity3d.com/Manual/android-manifest.html

Unity 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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: