using UnityEngine;
namespace Ximmerse.XR.Tag
{
///
/// The state after losing the Tag
///
public enum LostState
{
Stay,
FollowHead,
}
///
/// Tag tracking function
///
[AddComponentMenu("Ximmerse XR/Tag Tracking")]
public class TagTracking : XRTracking
{
[Header("--- Marker Setting ---")]
[SerializeField]
private int trackID = 65;
[SerializeField]
LostState trackingIsLost = LostState.Stay;
[Header("--- Debug Setting ---")]
[SerializeField]
private bool m_debugView = false;
[SerializeField]
private float m_size = 0.17f;
#region Property
///
/// Id
///
public int TrackId
{
get => trackID;
set => trackID = value;
}
///
/// Whether to enable debug mode
///
public bool DebugView
{
get => m_debugView;
set => m_debugView = value;
}
///
/// Axis dimensions in debug mode
///
public float Size
{
get => m_size;
set => m_size = value;
}
///
/// tracking state
///
public bool isTracking
{
get => IsTracking();
}
///
/// Stay or FollowHead when lost tracking.
///
public LostState TrackingIsLost
{
get => trackingIsLost;
set => trackingIsLost = value;
}
#endregion
}
}