diff options
author | Ignacio Etcheverry <neikeq@users.noreply.github.com> | 2018-08-04 05:22:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-04 05:22:38 +0200 |
commit | b911165679f906dbb4a18ff5eb0b9ac27c5485dc (patch) | |
tree | 19f4892e0dc3dc7da526cf75018c90fbb3d40898 /modules/mono/glue/cs_files/GD.cs | |
parent | 6c569c90b666c7fb773eca3948fc76ba7a160a27 (diff) | |
parent | cdb4ae471b6aeb0f1afacae3dd42774660d8f133 (diff) |
Merge pull request #20600 from exts/new_generic_methods
Mono: Added generic methods for PackedScene & ResourceLoader
Diffstat (limited to 'modules/mono/glue/cs_files/GD.cs')
-rw-r--r-- | modules/mono/glue/cs_files/GD.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/mono/glue/cs_files/GD.cs b/modules/mono/glue/cs_files/GD.cs index e2457ff98b..43de9156f2 100644 --- a/modules/mono/glue/cs_files/GD.cs +++ b/modules/mono/glue/cs_files/GD.cs @@ -64,6 +64,11 @@ namespace Godot return ResourceLoader.Load(path); } + public static T Load<T>(string path) where T : Godot.Resource + { + return (T) ResourceLoader.Load(path); + } + public static void Print(params object[] what) { NativeCalls.godot_icall_Godot_print(what); |