This site is for Yarn Spinner v1, and won't be updated. Go to the current site.

Value.AsNumber Property

Gets the numeric representation of this value.

public float AsNumber { get; }

Remarks

This method will attempt to convert the value to a number, if it isn’t already. The conversion is done in the following ways:

Exceptions

Exception Description
InvalidOperationException Thrown when the underlying value cannot be converted to a float.

Source

Defined in YarnSpinner/Value.cs, line 96.