docs.unity3d.com
    显示 / 隐藏目录

    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>>
    返回到顶部
    Copyright © 2023 Unity Technologies — 商标和使用条款
    • 法律条款
    • 隐私政策
    • Cookie
    • 不要出售或分享我的个人信息
    • Your Privacy Choices (Cookie Settings)