docs.unity3d.com
    目次を表示する/隠す

    Struct InteractionState

    InteractionState type to hold current state for a given interaction.

    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    ValueType.ToString()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: UnityEngine.XR.Interaction.Toolkit
    Syntax
    [Serializable]
    public struct InteractionState

    Properties

    activatedThisFrame

    Whether the interaction state activated this frame.

    Declaration
    public bool activatedThisFrame { get; set; }
    Property Value
    Type Description
    Boolean

    active

    Whether it is currently on.

    Declaration
    public bool active { get; set; }
    Property Value
    Type Description
    Boolean

    deactivatedThisFrame

    Whether the interaction state deactivated this frame.

    Declaration
    public bool deactivatedThisFrame { get; set; }
    Property Value
    Type Description
    Boolean

    deActivatedThisFrame

    (Deprecated) Whether the interaction state was deactivated this frame.

    Declaration
    [Obsolete("deActivatedThisFrame has been deprecated. Use deactivatedThisFrame instead. (UnityUpgradable) -> deactivatedThisFrame")]
    public bool deActivatedThisFrame { get; set; }
    Property Value
    Type Description
    Boolean
    Remarks

    deActivatedThisFrame has been deprecated. Use deactivatedThisFrame instead.

    value

    The value of the interaction in this frame.

    Declaration
    public float value { get; set; }
    Property Value
    Type Description
    Single

    Methods

    Reset()

    (Deprecated) Resets the interaction states that are based on whether they occurred "this frame".

    Declaration
    [Obsolete("Reset has been renamed. Use ResetFrameDependent instead. (UnityUpgradable) -> ResetFrameDependent()")]
    public void Reset()
    Remarks

    Reset has been deprecated. Use ResetFrameDependent() instead.

    ResetFrameDependent()

    Resets the interaction states that are based on whether they occurred "this frame".

    Declaration
    public void ResetFrameDependent()
    See Also
    activatedThisFrame
    deactivatedThisFrame

    SetFrameDependent(Boolean)

    Sets the interaction state that are based on whether they occurred "this frame".

    Declaration
    public void SetFrameDependent(bool wasActive)
    Parameters
    Type Name Description
    Boolean wasActive

    Whether the previous state is active (in other words, pressed).

    SetFrameState(Boolean)

    Sets the interaction state for this frame. This method should only be called once per frame.

    Declaration
    public void SetFrameState(bool isActive)
    Parameters
    Type Name Description
    Boolean isActive

    Whether the state is active (in other words, pressed).

    SetFrameState(Boolean, Single)

    Sets the interaction state for this frame. This method should only be called once per frame.

    Declaration
    public void SetFrameState(bool isActive, float newValue)
    Parameters
    Type Name Description
    Boolean isActive

    Whether the state is active (in other words, pressed).

    Single newValue

    The interaction value.

    トップに戻る
    Copyright © 2023 Unity Technologies — 商標と利用規約
    • 法律関連
    • プライバシーポリシー
    • クッキー
    • 私の個人情報を販売または共有しない
    • Your Privacy Choices (Cookie Settings)