AK056/Assets/script/utils/SerializationVector.cs
2025-05-07 11:20:40 +08:00

28 lines
441 B
C#

using UnityEngine;
[System.Serializable]
public class SerializationVector
{
public float x;
public float y;
public float z;
public SerializationVector(float x, float y, float z)
{
this.x = x;
this.y = y;
this.z = z;
}
public Vector3 ToVector()
{
return new Vector3(x,y,z);
}
public Quaternion ToQuaternion()
{
return Quaternion.Euler(x,y,z);
}
}