Class SceneViewInteractionModule | MARS | 1.0.1
docs.unity3d.com
    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
    Namespace: Unity.MARS
    Syntax
    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
    Int32

    Methods

    AddToSelection()

    Declaration
    public void AddToSelection()

    ClickHandling()

    Declaration
    public void ClickHandling()

    LoadModule()

    Declaration
    public void LoadModule()
    Implements
    IModule.LoadModule()

    RequestInteraction(Object, Boolean)

    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.

    Boolean enable

    Whether the object needs interaction enabled or not.

    SingleSelection()

    Declaration
    public void SingleSelection()

    UnloadModule()

    Declaration
    public void UnloadModule()
    Implements
    IModule.UnloadModule()

    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>>
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023