From 37ac19fe0b5fde91af3d34f78f93f766f37a538d Mon Sep 17 00:00:00 2001 From: Relintai Date: Sun, 11 Jun 2023 18:15:48 +0200 Subject: [PATCH] Fix ResourceLoader's load method signature. --- csharp_script.cpp | 2 +- csharp_script.h | 2 +- .../GodotSharp/Core/Extensions/ResourceLoaderExtensions.cs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/csharp_script.cpp b/csharp_script.cpp index 5941df3..09fc779 100644 --- a/csharp_script.cpp +++ b/csharp_script.cpp @@ -3397,7 +3397,7 @@ void CSharpScript::get_members(RBSet *p_members) { /*************** RESOURCE ***************/ -RES ResourceFormatLoaderCSharpScript::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_no_subresource_cache) { +RES ResourceFormatLoaderCSharpScript::load(const String &p_path, const String &p_original_path, Error *r_error) { if (r_error) *r_error = ERR_FILE_CANT_OPEN; diff --git a/csharp_script.h b/csharp_script.h index f482c48..433a210 100644 --- a/csharp_script.h +++ b/csharp_script.h @@ -482,7 +482,7 @@ public: class ResourceFormatLoaderCSharpScript : public ResourceFormatLoader { public: - virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL, bool p_no_subresource_cache = false); + virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL); virtual void get_recognized_extensions(List *p_extensions) const; virtual bool handles_type(const String &p_type) const; virtual String get_resource_type(const String &p_path) const; diff --git a/glue/GodotSharp/GodotSharp/Core/Extensions/ResourceLoaderExtensions.cs b/glue/GodotSharp/GodotSharp/Core/Extensions/ResourceLoaderExtensions.cs index 49f3b52..688c41e 100644 --- a/glue/GodotSharp/GodotSharp/Core/Extensions/ResourceLoaderExtensions.cs +++ b/glue/GodotSharp/GodotSharp/Core/Extensions/ResourceLoaderExtensions.cs @@ -22,9 +22,9 @@ namespace Godot /// Thrown when the given the loaded resource can't be casted to the given type . /// /// The type to cast to. Should be a descendant of . - public static T Load(string path, string typeHint = null, bool noCache = false) where T : class + public static T Load(string path, string typeHint = null) where T : class { - return (T)(object)Load(path, typeHint, noCache); + return (T)(object)Load(path, typeHint); } } }