ProtoFlux:To String: Difference between revisions

From Resonite Wiki
add example for converting objects to strings
m reword example caption slightly better
Line 37: Line 37:
== Examples ==
== Examples ==
<gallery widths=480px heights=480px>
<gallery widths=480px heights=480px>
File:Protoflux_example_to_string.webp|Four examples of the To String node. Three of the examples use [https://learn.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings Standard Numeric Format Strings].
File:Protoflux_example_to_string.webp|Four examples of converting various primitives to string. Three of the examples use [https://learn.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings Standard Numeric Format Strings].
File:Protoflux_example_to_string_2.webp|Four examples of converting various objects to string. Note how, in general, the output matches what the display node outputs.
File:Protoflux_example_to_string_2.webp|Four examples of converting various objects to string. Note how, in general, the output matches what the display node outputs.
</gallery>
</gallery>

Revision as of 19:46, 13 January 2024


Script error: The function "ProtoFlux" does not exist.

Usage

You can use this node for turning values into strings, even an object. Turning an object into a string is useful for taking what you see in a display node for a value directly into a string object. You can also use this for huds, like turning your FPS into text for a display, or readouts of objects or values.

Inputs

V (Generic)

The value to turn into a string.

Format (String)

A Composite Format String.

FormatProvider (IFormatProvider)

The locale to use for the output. Defaults to the invariant culture.

Outputs

* (String)

The value as a string following the format.

Examples