Class ARKitReferenceObjectEntry
Represents an ARKit-specific reference object for participation in an
XRReferenceObjectLibrary
.
Namespace: UnityEngine.XR.ARKit
Syntax
public sealed class ARKitReferenceObjectEntry : XRReferenceObjectEntry, ISerializationCallbackReceiver
Remarks
The actual data used at runtime is packaged into the Xcode project
in an asset catalog called ARReferenceObjects.xcassets
. It should
exist on disk in your project as an .arobject
file.
See Scanning and Detecting 3D Objects
for instructions on how to generate these files.
Properties
referenceOrigin
(Read Only) The reference origin of the scanned object (in session space).
Declaration
public Pose referenceOrigin { get; }
Property Value
Type | Description |
---|---|
UnityEngine.Pose |
Methods
Create(NativeSlice<Byte>)
Creates a new ARKitReferenceObjectEntry from a serialized ARReferenceObject.
Declaration
public static ARKitReferenceObjectEntry Create(NativeSlice<byte> data)
Parameters
Type | Name | Description |
---|---|---|
Unity.Collections.NativeSlice<Byte> | data | The bytes of a serialized ARReferenceObject. |
Returns
Type | Description |
---|---|
ARKitReferenceObjectEntry | Returns a new ARKitReferenceObjectEntry if |
OnAddToLibrary(XRReferenceObjectLibrary, XRReferenceObject)
Invoked when a new XRReferenceObject is added to an XRReferenceObjectLibrary.
Declaration
protected override void OnAddToLibrary(XRReferenceObjectLibrary library, XRReferenceObject xrReferenceObject)
Parameters
Type | Name | Description |
---|---|---|
XRReferenceObjectLibrary | library | The library to which the reference object is being added. |
XRReferenceObject | xrReferenceObject | The reference object being added to the |
Overrides
Explicit Interface Implementations
ISerializationCallbackReceiver.OnAfterDeserialize()
Invoked just after deserialization.
Declaration
void ISerializationCallbackReceiver.OnAfterDeserialize()
Implements
ISerializationCallbackReceiver.OnBeforeSerialize()
Invoked just before serialization.
Declaration
void ISerializationCallbackReceiver.OnBeforeSerialize()