Edit

Share via


StringExtensions.ToVector3(String) Method

Definition

Converts a String value to a Vector3 value. This method always assumes the invariant culture for parsing values (',' separates numbers, '.' is the decimal separator). The input text can either represents a single number (mapped to Vector3(Single), or multiple components. Additionally, the format "<float, float, float>" is also allowed (though less efficient to parse).

public static System.Numerics.Vector3 ToVector3 (this string text);
static member ToVector3 : string -> System.Numerics.Vector3
<Extension()>
Public Function ToVector3 (text As String) As Vector3

Parameters

text
String

A String with the values to parse.

Returns

The parsed Vector3 value.

Exceptions

Thrown when text doesn't represent a valid Vector3 value.

Applies to