diff options
author | Alberto Vilches <194074+avilches@users.noreply.github.com> | 2022-12-14 16:46:10 +0100 |
---|---|---|
committer | Alberto Vilches <194074+avilches@users.noreply.github.com> | 2022-12-15 13:38:09 +0100 |
commit | 2d60b9c6e4d6576e114a2efd7177fb71e7f03bf6 (patch) | |
tree | adfd5befbc0f334df255c5be81c467d910118cf6 /modules/mono/glue | |
parent | 346efd29e0a6ff8bd9f7d4582b431d9ec9d22869 (diff) |
Added Projection to ConvertTo<T> and CreateFrom<T>
Diffstat (limited to 'modules/mono/glue')
-rw-r--r-- | modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/VariantUtils.generic.cs | 6 |
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)); |