Add ultimate xr

This commit is contained in:
2024-08-06 21:58:35 +02:00
parent 864033bf10
commit 7165bacd9d
3952 changed files with 2162037 additions and 35 deletions

View File

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