Skip to Main Content

BTD_Mod_Helper​.Api​.Hooks​.HookNullable_T_


BloonsTD6 Mod Helper

BTD_Mod_Helper.Api.Hooks

HookNullable Struct

Provides a simplified nullable type for unmanaged types, used as a replacement for Il2CPP's nullable implementation

public struct HookNullable<T>
    where T : unmanaged, System.ValueType, System.ValueType

Type parameters

T

The underlying unmanaged type

Constructors

HookNullable(T) Constructor

Constructor that takes in the value set

public HookNullable(T value);

Parameters

value T

Value to contain

Fields

HookNullable.HasValue Field

Indicates whether a value is present
A non-zero value indicates that the Value is valid

public byte HasValue;

Field Value

System.Byte

HookNullable.Value Field

The underlying value of type T if available
Access this value only when HasValue indicates that a value is present

public T Value;

Field Value

T

Methods

HookNullable.GetValueOrDefault() Method

Adds a quick way to get whatever value is contained

public T GetValueOrDefault();

Returns

T
If HasValue is non-zero, Value, otherwise default

To learn how to download BTD Mod Helper and install mods, click here