Class XRReferenceObjectLibrary
A container for reference objects. A reference object represents a 3D scan of a real object that can be recognized in the environment. A XRObjectTrackingSubsystem will search for objects based on the contents of a XRReferenceObjectLibrary.
Inherited Members
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: UnityEngine.XR.ARSubsystems
Assembly: solution.dll
Syntax
[CreateAssetMenu(fileName = "ReferenceObjectLibrary", menuName = "XR/Reference Object Library", order = 3)]
[HelpURL("https://docs.unity.cn/Packages/com.unity.xr.arsubsystems@4.2/manual/object-tracking.html")]
public class XRReferenceObjectLibrary : ScriptableObject, IEnumerable<XRReferenceObject>, IEnumerable
Properties
Name | Description |
---|---|
this[int] | Get a reference object by index. |
count | The number of reference objects in the library. |
guid | A |
Methods
Name | Description |
---|---|
Add(XRReferenceObject) | Adds a new XRReferenceObject to this library. |
GetEnumerator() | Gets an enumerator which can be used to iterate over the reference objects in this library. |
IndexOf(XRReferenceObject) | Get the index of |
indexOf(XRReferenceObject) | Get the index of |