|
@@ -16,5 +16,25 @@ namespace MeidoPhotoStudio.Converter.MultipleMaids
|
|
|
var data = vector3.Split(',');
|
|
|
return new(float.Parse(data[0]), float.Parse(data[1]), float.Parse(data[2]));
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ public static bool TryParseEulerAngle(string euler, out Quaternion result)
|
|
|
+ {
|
|
|
+ result = Quaternion.identity;
|
|
|
+
|
|
|
+ var data = euler.Split(',');
|
|
|
+
|
|
|
+ if (data.Length != 3) return false;
|
|
|
+
|
|
|
+ try { result = Quaternion.Euler(float.Parse(data[0]), float.Parse(data[1]), float.Parse(data[2])); }
|
|
|
+ catch { return false; }
|
|
|
+
|
|
|
+ return true;
|
|
|
+ }
|
|
|
}
|
|
|
}
|