using UnityEngine.XR.Interaction.Toolkit.Interactables;
using UnityEngine.XR.Interaction.Toolkit.Interactors;
namespace UnityEngine.XR.Interaction.Toolkit
{
///
/// An interface that represents an interactable component that has an optional reference to a
/// parent interactable for determining processing order of interactables.
///
///
/// Interactor or interactable components that implement this interface enable the
/// to automatically register the parent relationship when the component is registered. If the interactable
/// component does not implement this interface, any parent relationship the component has must be manually
/// registered.
///
///
///
///
///
///
public interface IXRParentInteractableLink
{
///
/// Whether the XR Interaction Manager will automatically find a parent interactable up the GameObject
/// hierarchy when this object is first registered with it. Set to disabled if you
/// want to avoid the runtime performance expense of an automatic GetComponentInParent call.
///
///
/// Ignored if the reference is assigned.
///
///
bool autoFindParentInteractableInHierarchy { get; set; }
///
/// An optional reference to a parent interactable for determining processing order of interactables.
///
///
/// For interactables that implement this, the referenced parent interactable will be processed before
/// this interactable.
///
/// For interactors that implement this, selected interactables will inherit this referenced parent interactable
/// for determining the process order of interactables such that parents are processed before their children
/// interactables.
///
/// The interactables must be registered with the same XR Interaction Manager for this to have an effect
/// on processing order.
///
IXRInteractable parentInteractable { get; set; }
}
}