docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class SceneViewInteractionModule

    Module that handles mouse hovering and selecting interaction targets. When selected, it shows a button to open the create menu.

    Inheritance
    object
    SceneViewInteractionModule
    Implements
    IModule
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEditor.MARS.Authoring
    Assembly: Unity.MARS.Editor.dll
    Syntax
    [MovedFrom("Unity.MARS")]
    public class SceneViewInteractionModule : IModule

    Properties

    CurrentHoverTarget

    The interaction target that is currently hovered

    Declaration
    public InteractionTarget CurrentHoverTarget { get; }
    Property Value
    Type Description
    InteractionTarget

    CurrentSelection

    All of the interaction targets currently selected

    Declaration
    public List<InteractionTarget> CurrentSelection { get; }
    Property Value
    Type Description
    List<InteractionTarget>

    LastSimViewClickPosition

    The last place where the user clicked in the scene.

    Declaration
    public Vector3 LastSimViewClickPosition { get; }
    Property Value
    Type Description
    Vector3

    SelectionLimit

    The max amount of things that can be selected at once

    Declaration
    public int SelectionLimit { get; set; }
    Property Value
    Type Description
    int

    Methods

    AddToSelection()

    Gets current hover target then adds the current interaction target

    Declaration
    public void AddToSelection()

    ClickHandling()

    Handle the click behavior in when using an interaction target

    Declaration
    public void ClickHandling()

    RequestInteraction(object, bool)

    Add or remove an object that needs scene view interaction. If there is at least one user requesting interaction, it will be enabled.

    Declaration
    public void RequestInteraction(object user, bool enable)
    Parameters
    Type Name Description
    object user

    The object that is using scene view interaction, used to avoid duplicate requests.

    bool enable

    Whether the object needs interaction enabled or not.

    SingleSelection()

    Clears selection before adding current interaction target

    Declaration
    public void SingleSelection()

    Events

    HoverBegin

    Event when a new target starts being hovered

    Declaration
    public event Action<InteractionTarget> HoverBegin
    Event Type
    Type Description
    Action<InteractionTarget>

    HoverEnd

    Event when a target is no longer being hovered

    Declaration
    public event Action<InteractionTarget> HoverEnd
    Event Type
    Type Description
    Action<InteractionTarget>

    HoverUpdate

    Event during a hover interaction that includes the raycast hit on the target

    Declaration
    public event Action<InteractionTarget, RaycastHit> HoverUpdate
    Event Type
    Type Description
    Action<InteractionTarget, RaycastHit>

    SelectionChanged

    Event when the target selection has changed

    Declaration
    public event Action<List<InteractionTarget>> SelectionChanged
    Event Type
    Type Description
    Action<List<InteractionTarget>>

    Implements

    Unity.XRTools.ModuleLoader.IModule
    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)