docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Class BindableVariableAlloc<T>

    Generic class which contains a member variable of type T and provides a binding API to data changes. If T is IEquatable, use BindableVariable<T> instead.

    Inheritance
    object
    BindableVariableBase<T>
    BindableVariableAlloc<T>
    Implements
    IReadOnlyBindableVariable<T>
    Inherited Members
    BindableVariableBase<T>.Value
    BindableVariableBase<T>.BindingCount
    BindableVariableBase<T>.SetValueWithoutNotify(T)
    BindableVariableBase<T>.Subscribe(Action<T>)
    BindableVariableBase<T>.SubscribeAndUpdate(Action<T>)
    BindableVariableBase<T>.Unsubscribe(Action<T>)
    BindableVariableBase<T>.BroadcastValue()
    BindableVariableBase<T>.Task(Func<T, bool>, CancellationToken)
    BindableVariableBase<T>.Task(T, CancellationToken)
    BindableVariableBase<T>.ValueEquals(T)
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Unity.XR.CoreUtils.Bindings.Variables
    Assembly: solution.dll
    Syntax
    public class BindableVariableAlloc<T> : BindableVariableBase<T>, IReadOnlyBindableVariable<T>
    Type Parameters
    Name Description
    T

    The type of the variable value.

    Remarks

    This class can be used for types which are not IEquatable. Since T is not IEquatable, when setting the value, it calls object.Equals and will GC alloc.

    Constructors

    Name Description
    BindableVariableAlloc(T, bool, Func<T, T, bool>, bool)

    Constructor for bindable variable of type T, which is a variable that notifies listeners when the internal value changes.

    See Also

    BindableVariable<T>
    In This Article
    Back to top
    Copyright © 2024 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)