docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class SimulatedHitTestProvider

    Inheritance
    object
    SimulatedHitTestProvider
    Implements
    IProvidesMRHitTesting
    IFunctionalityProvider
    IUsesPlaneFinding
    IFunctionalitySubscriber<IProvidesPlaneFinding>
    IUsesPointCloud
    IFunctionalitySubscriber<IProvidesPointCloud>
    IFunctionalitySubscriber
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.MARS.Providers.Synthetic
    Assembly: Unity.MARS.dll
    Syntax
    [ProviderSelectionOptions(-1073741824, null, false)]
    [MovedFrom("Unity.MARS.Providers")]
    public class SimulatedHitTestProvider : IProvidesMRHitTesting, IFunctionalityProvider, IUsesPlaneFinding, IFunctionalitySubscriber<IProvidesPlaneFinding>, IUsesPointCloud, IFunctionalitySubscriber<IProvidesPointCloud>, IFunctionalitySubscriber

    Methods

    ScreenHitTest(Vector2, out MRHitTestResult, MRHitTestResultTypes)

    Perform a screen-based hit test against MR feature points.

    Declaration
    public bool ScreenHitTest(Vector2 screenPosition, out MRHitTestResult result, MRHitTestResultTypes types = MRHitTestResultTypes.Any)
    Parameters
    Type Name Description
    Vector2 screenPosition

    The screen position from which test will originate

    MRHitTestResult result

    The result of the hit test

    MRHitTestResultTypes types

    The types of results to test against

    Returns
    Type Description
    bool

    Whether the test succeeded

    StartHitTesting()

    Start performing hit tests. Hit test support is enabled on initialization, so this is only necessary after calling StopDetecting.

    Declaration
    public void StartHitTesting()

    StopHitTesting()

    Stop performing hit tests. This will happen automatically on destroying the session. It is only necessary to call this method to pause plane detection while maintaining camera tracking

    Declaration
    public void StopHitTesting()

    WorldHitTest(Ray, out MRHitTestResult, MRHitTestResultTypes)

    Perform a world-based hit test against MR feature points.

    Declaration
    public bool WorldHitTest(Ray ray, out MRHitTestResult result, MRHitTestResultTypes types = MRHitTestResultTypes.Any)
    Parameters
    Type Name Description
    Ray ray

    The ray to test

    MRHitTestResult result

    The result of the hit test

    MRHitTestResultTypes types

    The types of results to test against

    Returns
    Type Description
    bool

    Whether the test succeeded

    Implements

    IProvidesMRHitTesting
    Unity.XRTools.ModuleLoader.IFunctionalityProvider
    IUsesPlaneFinding
    Unity.XRTools.ModuleLoader.IFunctionalitySubscriber<TProvider>
    IUsesPointCloud
    Unity.XRTools.ModuleLoader.IFunctionalitySubscriber<TProvider>
    Unity.XRTools.ModuleLoader.IFunctionalitySubscriber

    Extension Methods

    IUsesPlaneFindingMethods.GetPlanes(IUsesPlaneFinding, List<MRPlane>)
    IUsesPlaneFindingMethods.StartDetectingPlanes(IUsesPlaneFinding)
    IUsesPlaneFindingMethods.StopDetectingPlanes(IUsesPlaneFinding)
    IUsesPlaneFindingMethods.SubscribePlaneAdded(IUsesPlaneFinding, Action<MRPlane>)
    IUsesPlaneFindingMethods.SubscribePlaneRemoved(IUsesPlaneFinding, Action<MRPlane>)
    IUsesPlaneFindingMethods.SubscribePlaneUpdated(IUsesPlaneFinding, Action<MRPlane>)
    IUsesPlaneFindingMethods.UnsubscribePlaneAdded(IUsesPlaneFinding, Action<MRPlane>)
    IUsesPlaneFindingMethods.UnsubscribePlaneRemoved(IUsesPlaneFinding, Action<MRPlane>)
    IUsesPlaneFindingMethods.UnsubscribePlaneUpdated(IUsesPlaneFinding, Action<MRPlane>)
    IUsesPointCloudMethods.GetPoints(IUsesPointCloud)
    IUsesPointCloudMethods.StartDetectingPoints(IUsesPointCloud)
    IUsesPointCloudMethods.StopDetectingPoints(IUsesPointCloud)
    IUsesPointCloudMethods.SubscribePointCloudUpdated(IUsesPointCloud, Action<Dictionary<MarsTrackableId, PointCloudData>>)
    IUsesPointCloudMethods.UnsubscribePointCloudUpdated(IUsesPointCloud, Action<Dictionary<MarsTrackableId, PointCloudData>>)
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)