diff options
author | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2018-10-05 19:39:11 +0200 |
---|---|---|
committer | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2018-10-05 19:39:11 +0200 |
commit | b5aa5bca12ef5995da8b5da9614a51a69c133112 (patch) | |
tree | 0351081b58376f9ded23d0810937b6ef57efea98 /modules/mono/glue/Managed/Files/Extensions | |
parent | 6bc18042c2a809a27638f410db577ff95826c49b (diff) |
Fix C# API assembly build errors in generics
Diffstat (limited to 'modules/mono/glue/Managed/Files/Extensions')
-rw-r--r-- | modules/mono/glue/Managed/Files/Extensions/NodeExtensions.cs | 8 | ||||
-rw-r--r-- | modules/mono/glue/Managed/Files/Extensions/ResourceLoaderExtensions.cs | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/modules/mono/glue/Managed/Files/Extensions/NodeExtensions.cs b/modules/mono/glue/Managed/Files/Extensions/NodeExtensions.cs index c978318cac..366d89b1c2 100644 --- a/modules/mono/glue/Managed/Files/Extensions/NodeExtensions.cs +++ b/modules/mono/glue/Managed/Files/Extensions/NodeExtensions.cs @@ -4,7 +4,7 @@ namespace Godot { public T GetNode<T>(NodePath path) where T : class { - return (T)GetNode(path); + return (T)(object)GetNode(path); } public T GetNodeOrNull<T>(NodePath path) where T : class @@ -14,7 +14,7 @@ namespace Godot public T GetChild<T>(int idx) where T : class { - return (T)GetChild(idx); + return (T)(object)GetChild(idx); } public T GetChildOrNull<T>(int idx) where T : class @@ -24,7 +24,7 @@ namespace Godot public T GetOwner<T>() where T : class { - return (T)GetOwner(); + return (T)(object)GetOwner(); } public T GetOwnerOrNull<T>() where T : class @@ -34,7 +34,7 @@ namespace Godot public T GetParent<T>() where T : class { - return (T)GetParent(); + return (T)(object)GetParent(); } public T GetParentOrNull<T>() where T : class diff --git a/modules/mono/glue/Managed/Files/Extensions/ResourceLoaderExtensions.cs b/modules/mono/glue/Managed/Files/Extensions/ResourceLoaderExtensions.cs index ceecc589e6..684d160b57 100644 --- a/modules/mono/glue/Managed/Files/Extensions/ResourceLoaderExtensions.cs +++ b/modules/mono/glue/Managed/Files/Extensions/ResourceLoaderExtensions.cs @@ -2,9 +2,9 @@ namespace Godot { public static partial class ResourceLoader { - public static T Load<T>(string path) where T : Godot.Resource + public static T Load<T>(string path) where T : class { - return (T) Load(path); + return (T)(object)Load(path); } } } |