Float

Float cast nodes

You can use a float cast node to convert a float value to an integer or a string.

The Float To Int node rounds down to the nearest whole number.

Float cast nodes

Inputs:

Name
Type
Description

Input

Float

The value to be converted.

Outputs:

Name
Type
Description

Output

<varies> [editable]

The converted value. The output depends on the chosen node, and is either an integer or a string.

Logic Float Changed

Outputs true in the frame where the input value changes.

Inputs:

Name
Type
Description

Input

Float

The float value to monitor.

Outputs:

Name
Type
Description

Output

Boolean

True when the Input changes, but resets to false at the end of the frame.

Float Constant

Outputs a float value. An AFX graph cannot change the value of this node.

You can open an AFX graph to change the value of this node in the Unity Editor.

Outputs:

Name
Type
Description

Output

Float [editable]

A floating point number.

Generate Random Float

Generates a random number between Min and Max values, inclusive. For more information, refer to Random.Range in the Unity documentation.

Inputs:

Name
Type
Description

Enter

Flow

Flow to activate the node.

Min

Float [editable]

The minimum value for the randomly generated number.

Max

Float [editable]

The maximum value for the randomly generated number.

Outputs:

Name
Type
Description

Exit

Flow

Continue the activating flow.

Output

Float

The randomly generated number.

Get Float

Converts a reference to a float component to a float value.

Inputs:

Name
Type
Description

Float Component

Float Component

Reference to a float component.

Outputs:

Name
Type
Description

Output

Float

The value of the float component.

Invert Float

Inverts a float value. Essentially changes the sign of the float from positive to negative or from negative to positive.

Inputs:

Name
Type
Description

Input

Float

The value to be inverted.

Outputs:

Name
Type
Description

Output

Float

The inverted value of the Input.

Set Float

Set the value of a float object when activated by a flow.

Inputs:

Name
Type
Description

Enter

Flow

Flow to activate the node

Float Component

Object

Reference to the float object for which the value will be set.

Value In

Float [editable]

The value to be applied to the Float Component. Either the value provided to the input port or the value set in the field.

Outputs:

Name
Type
Description

Exit

Flow

Continue the activating flow.

Output

Float

Either the value provided to the Value In input port or the value set in the field.

Last updated