// -------------------------------------------------------------------------------------------------------------------- // // Copyright (c) VRMADA, All rights reserved. // // -------------------------------------------------------------------------------------------------------------------- using UltimateXR.Core.Components; using UnityEngine; namespace UltimateXR.Manipulation.Helpers { /// /// Anchor component for . Grabbable objects with the /// component will automatically attach/detach from this anchor. /// [RequireComponent(typeof(UxrGrabbableObjectAnchor))] public class UxrAutoSlideInAnchor : UxrComponent { #region Public Types & Data /// /// Gets the anchor. /// public UxrGrabbableObjectAnchor Anchor { get { if (_anchor == null) { _anchor = GetComponent(); } return _anchor; } } #endregion #region Unity /// /// Initializes the component. /// protected override void Awake() { base.Awake(); if (_anchor == null) { _anchor = GetComponent(); } } #endregion #region Private Types & Data private UxrGrabbableObjectAnchor _anchor; #endregion } }