コード例 #1
0
        /// <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
        }
コード例 #2
0
 /// <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));
 }
コード例 #3
0
 /// <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);
コード例 #4
0
 public int indexOf(XRReferenceObject referenceObject) => IndexOf(referenceObject);