- Home /
Permissions on application startup
Why doesn't Unity ask for Android permissions on application startup after version 2018.3? Is it possible to have Unity ask for permissions on application startup?
Answer by Deathdefy · Jun 18, 2019 at 05:36 PM
Just ask for permission through scripting.
void Start ()
{
#if PLATFORM_ANDROID
if (!Permission.HasUserAuthorizedPermission(Permission.Microphone))
{
Permission.RequestUserPermission(Permission.Microphone);
dialog = new GameObject();
}
#endif
}
More documentation on this can be found in Unitys manuals. https://docs.unity3d.com/Manual/android-RequestingPermissions.html
For some reason that code stop working. do you know some other way?
Your answer
Follow this Question
Related Questions
Android camera permission? 1 Answer
does unity 5.3 android sms billing status require configuration changes ? 0 Answers
Unwanted permissions on Android when Firebase is implemented. 1 Answer
Android Marshmallow obb Storage permission problem on Some Devices 0 Answers
Users being asked unnecessary permissions to play app 1 Answer