```
chore(bridge): 删除桥接包的提交记录和Git属性配置 删除了 .codely-bridge-commit 文件中存储的提交哈希值 移除了 .gitattributes 文件中的行结束符配置规则 ```
This commit is contained in:
1 parent
d26d323912
commit
13d0c80335
392 files changed
+1814
-1895
No files matched your search
+25
@@ -0,0 +1,25 @@
|
||||
using Codely.Newtonsoft.Json.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityTcp.Editor.Helpers
|
||||
{
|
||||
/// <summary>
|
||||
/// Helper class for Vector3 operations
|
||||
/// </summary>
|
||||
public static class Vector3Helper
|
||||
{
|
||||
/// <summary>
|
||||
/// Parses a JArray into a Vector3
|
||||
/// </summary>
|
||||
/// <param name="array">The array containing x, y, z coordinates</param>
|
||||
/// <returns>A Vector3 with the parsed coordinates</returns>
|
||||
/// <exception cref="System.Exception">Thrown when array is invalid</exception>
|
||||
public static Vector3 ParseVector3(JArray array)
|
||||
{
|
||||
if (array == null || array.Count != 3)
|
||||
throw new System.Exception("Vector3 must be an array of 3 floats [x, y, z].");
|
||||
return new Vector3((float)array[0], (float)array[1], (float)array[2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user