Class ARCorePermissionManager
Manages Android permissions for the application. Allows you to determine whether a permission has been granted and request permission.
Inherited Members
Namespace: UnityEngine.XR.ARCore
Assembly: Unity.XR.ARCore.dll
Syntax
public class ARCorePermissionManager : AndroidJavaProxy
Methods
IsPermissionGranted(string)
Checks if an Android permission is granted to the application.
Declaration
public static bool IsPermissionGranted(string permissionName)
Parameters
Type | Name | Description |
---|---|---|
string | permissionName | The full name of the Android permission to check (e.g. android.permission.CAMERA). |
Returns
Type | Description |
---|---|
bool |
|
RequestPermission(string, Action<string, bool>)
Requests an Android permission from the user.
Declaration
public static void RequestPermission(string permissionName, Action<string, bool> callback)
Parameters
Type | Name | Description |
---|---|---|
string | permissionName | The permission to be requested (e.g. android.permission.CAMERA). |
Action<string, bool> | callback | A delegate to invoke when the permission has been granted or denied. The
parameters of the delegate are the |