summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-12-15 22:09:26 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-12-15 22:09:26 +0100
commit1bbbb037c1d59ba6ad72687bac2de9dde205114b (patch)
tree01f1448482d19f72a707d0fff1db330df898bf53
parent9ba3f9d1db1c52c88f05f1c157a746d968c5dfaf (diff)
parent2d60b9c6e4d6576e114a2efd7177fb71e7f03bf6 (diff)
Merge pull request #70062 from avilches/added-projection-type-to-convert-to
Added Projection to ConvertTo<T> and CreateFrom<T>
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/VariantUtils.generic.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/VariantUtils.generic.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/VariantUtils.generic.cs
index 9a3ed85e66..ebfc713ee4 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/VariantUtils.generic.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/VariantUtils.generic.cs
@@ -92,6 +92,9 @@ public partial class VariantUtils
if (typeof(T) == typeof(Transform2D))
return CreateFromTransform2D(UnsafeAs<Transform2D>(from));
+ if (typeof(T) == typeof(Projection))
+ return CreateFromProjection(UnsafeAs<Projection>(from));
+
if (typeof(T) == typeof(Vector3))
return CreateFromVector3(UnsafeAs<Vector3>(from));
@@ -293,6 +296,9 @@ public partial class VariantUtils
if (typeof(T) == typeof(Transform3D))
return UnsafeAsT(ConvertToTransform3D(variant));
+ if (typeof(T) == typeof(Projection))
+ return UnsafeAsT(ConvertToProjection(variant));
+
if (typeof(T) == typeof(Vector4))
return UnsafeAsT(ConvertToVector4(variant));