字符串转三位向量

来源:互联网 发布:网络骚扰电话怎么办 编辑:程序博客网 时间:2024/06/11 21:00
 //字符串转三位向量    public Vector3 GetVector3(string str)    {        string[] pos = str.Split(new char[] { ',' },System.StringSplitOptions.RemoveEmptyEntries);        return new Vector3(float.Parse(pos[0]), float.Parse(pos[1]), float.Parse(pos[2]));    }