Class MagicLeapImageTrackingSubsystem
Inheritance
Inherited Members
Namespace: UnityEngine.XR.MagicLeap
Syntax
public sealed class MagicLeapImageTrackingSubsystem : XRImageTrackingSubsystem
Properties
nativeTrackerCreationJobHandle
The
Declaration
public static JobHandle nativeTrackerCreationJobHandle { get; }
Property Value
Type | Description |
---|---|
JobHandle |
Remarks
The creation of the native image tracker handle that enables image tracking on Lumin devices has an average startup time of anywhere between ~1500ms - ~6000ms depending on the state of the device and is blocking. This subsystem opts to perform this operation asynchronously because of this.
Methods
CreateProvider()
Declaration
protected override XRImageTrackingSubsystem.Provider CreateProvider()
Returns
Type | Description |
---|---|
XRImageTrackingSubsystem.Provider |
GetAutomaticImageStationarySettingsEnforcementPolicy()
Returns whether the subsystem is in control of the stationary settings for images.
Declaration
public bool GetAutomaticImageStationarySettingsEnforcementPolicy()
Returns
Type | Description |
---|---|
Boolean | Returns |
IsValid()
Checks to see whether the native provider is valid and whether permission has been granted.
Declaration
public bool IsValid()
Returns
Type | Description |
---|---|
Boolean |
|
Remarks
There are a number of reasons for false. Either privileges were denied or the device experienced and internal error and was not able to create the native tracking resource. Should the latter be the case, native error logs will have more information.
SetAutomaticImageStationarySettingsEnforcementPolicy(Boolean)
Sets whether the subsystem should have ownership of the stationary setting for images based on the "maxNumberOfMovingImages"
.
Declaration
public void SetAutomaticImageStationarySettingsEnforcementPolicy(bool shouldEnforceSubsystemOwnership)
Parameters
Type | Name | Description |
---|---|---|
Boolean | shouldEnforceSubsystemOwnership | If passed in |
TrySetReferenceImageStationary(XRReferenceImage, Boolean)
Attempts to set whether the subsystem should treat the given XRReferenceImage
as stationary or not.
Declaration
public bool TrySetReferenceImageStationary(XRReferenceImage referenceImage, bool isStationary)
Parameters
Type | Name | Description |
---|---|---|
XRReferenceImage | referenceImage | The |
Boolean | isStationary | Whether or not the target image should be treated as a stationary image in the real world. The default value is |
Returns
Type | Description |
---|---|
Boolean |
|
Remarks
This will implicitly transfer ownership of the stationary setting for images from the subsystem to the user. In order to give ownership back, use SetAutomaticImageStationarySettingsEnforcementPolicy(Boolean).