/**************************************************************************** * Copyright 2019 Nreal Techonology Limited. All rights reserved. * * This file is part of NRSDK. * * https://www.nreal.ai/ * *****************************************************************************/ namespace NRKernal { using UnityEngine; /// Base classes for all trackable monobehaviour objects. public class NRTrackableBehaviour : MonoBehaviour { /// The trackable. public NRTrackable Trackable; /// Initializes this object. /// The trackable. public void Initialize(NRTrackable trackable) { Trackable = trackable; } /// Name of the trackable. [HideInInspector, SerializeField] protected string m_TrackableName = ""; /// True to preserve child size. [HideInInspector, SerializeField] protected bool m_PreserveChildSize; /// True to initialized in editor. [HideInInspector, SerializeField] protected bool m_InitializedInEditor; /// Zero-based index of the database. [HideInInspector, SerializeField] protected int m_DatabaseIndex = -1; /// Gets or sets the name of the trackable. /// The name of the trackable. public string TrackableName { get { return m_TrackableName; } set { m_TrackableName = value; } } /// Gets or sets a value indicating whether the preserve child size. /// True if preserve child size, false if not. public bool PreserveChildSize { get { return m_PreserveChildSize; } set { m_PreserveChildSize = value; } } /// Gets or sets a value indicating whether the initialized in editor. /// True if initialized in editor, false if not. public bool InitializedInEditor { get { return m_InitializedInEditor; } set { m_InitializedInEditor = value; } } /// Gets or sets the zero-based index of the database. /// The database index. public int DatabaseIndex { get { return m_DatabaseIndex; } set { m_DatabaseIndex = value; } } } }