Content-Length: 21623 | pFad | https://docs.unity3d.com/ScriptReference/../Manual/../ScriptReference/Vector2-operator_float2.html
| Parameter | Description |
|---|---|
| v | The float2 to be converted to a Vector2. |
Vector2 The converted Vector2 result.
// Attach this script to a GameObject. using UnityEngine; using Unity.Mathematics; // brings in float2
public class Example_Vector2_FromFloat2 : MonoBehaviour { void Start() { float2 a = new float2(4f, 5f); Debug.Log("Input float2 is: " + a.ToString());
// Implicit conversion from Unity.Mathematics.float2 to UnityEngine.Vector2 Vector2 result = a; Debug.Log("Result Vector2 is: " + result.ToString()); } }
Fetched URL: https://docs.unity3d.com/ScriptReference/../Manual/../ScriptReference/Vector2-operator_float2.html
Alternative Proxies: