Skip to content

Debology.Debby.Modules.Adjust ​

AdjustableUtils Class ​

Utility extension methods for working with AdjustableValues.

csharp
public static class AdjustableUtils

Inheritance System.Object 🡒 AdjustableUtils

Methods ​

AdjustableUtils.BindTwoWay<T>(this IAdjustableValue<T>, INotifyValueChanged<T>) Method ​

Creates a two-way binding between an adjustable value and a UI element. Changes to either the adjustable value or the UI element will be reflected in the other.

csharp
public static void BindTwoWay<T>(this Debology.Debby.Modules.Adjust.IAdjustableValue<T> adjustableValue, INotifyValueChanged<T> uiElement);

Type parameters ​

T

The type of the value being bound

Parameters ​

adjustableValue Debology.Debby.Modules.Adjust.IAdjustableValue<T>

The adjustable value to bind

uiElement UnityEngine.UIElements.INotifyValueChanged

The UI element to bind (must implement INotifyValueChanged)

AdjustableUtils.IsNullOrEmpty(this AdjustableValue<string>) Method ​

Checks if the string value of the adjustable is null or empty.

csharp
public static bool IsNullOrEmpty(this Debology.Debby.Modules.Adjust.AdjustableValue<string> value);

Parameters ​

value Debology.Debby.Modules.Adjust.AdjustableValue<System.String>

Returns ​

System.Boolean

AdjustableUtils.UnbindTwoWay<T>(this IAdjustableValue<T>, INotifyValueChanged<T>) Method ​

Unbinds a two-way binding between an adjustable value and a UI element.

csharp
public static void UnbindTwoWay<T>(this Debology.Debby.Modules.Adjust.IAdjustableValue<T> adjustableValue, INotifyValueChanged<T> uiElement);

Type parameters ​

T

The type of the value being unbound

Parameters ​

adjustableValue Debology.Debby.Modules.Adjust.IAdjustableValue<T>

The adjustable value to unbind

uiElement UnityEngine.UIElements.INotifyValueChanged

The UI element to unbind (must implement INotifyValueChanged)