/// <summary> /// Adds a new <see cref="XRReferenceObject"/> to this library. /// </summary> /// <param name="referenceObject">The reference object to add.</param> public void Add(XRReferenceObject referenceObject) { referenceObject.OnAddToLibrary(this); m_ReferenceObjects.Add(referenceObject); #if UNITY_EDITOR EditorUtility.SetDirty(this); #endif }
/// <summary> /// Get the index of <paramref name="referenceObject"/> in the object library. /// </summary> /// <param name="referenceObject">The <see cref="XRReferenceObject"/> to find.</param> /// <returns>The zero-based index of the <paramref name="referenceObject"/>, or -1 if not found.</returns> public int indexOf(XRReferenceObject referenceObject) { return(m_ReferenceObjects.IndexOf(referenceObject)); }
/// <summary> /// Get the index of <paramref name="referenceObject"/> in the object library. /// </summary> /// <param name="referenceObject">The <see cref="XRReferenceObject"/> to find.</param> /// <returns>Returns the zero-based index of the <paramref name="referenceObject"/> if found. Returns -1 if not /// found.</returns> public int IndexOf(XRReferenceObject referenceObject) => m_ReferenceObjects.IndexOf(referenceObject);
public int indexOf(XRReferenceObject referenceObject) => IndexOf(referenceObject);