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
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 |
---|---|
Boolean |
|
RequestPermission(String, Action<String, Boolean>)
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, Boolean> | callback | A delegate to invoke when the permission has been granted or denied. The
parameters of the delegate are the |