namespace UnityEngine.XR.Interaction.Toolkit.UI
{
///
/// Helper object for the .
/// Monitors for hierarchy changes to ensure that only a top-level canvas is in place.
///
[AddComponentMenu("")]
[HelpURL(XRHelpURLConstants.k_CanvasTracker)]
public class CanvasTracker : MonoBehaviour
{
///
/// Keeps track of if this canvas' place in the transform hierarchy has changed at all (parent added/removed, etc.).
///
public bool transformDirty { get; set; }
void OnEnable()
{
transformDirty = true;
}
void OnTransformParentChanged()
{
transformDirty = true;
}
}
}