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
CancelPermissionRequest()
Cancels any pending Android permission requests.
Declaration
public static void CancelPermissionRequest()
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 | true if |
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 request (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 |