GDScript: Ensure correct caching of cyclic references

This commit is contained in:
HolonProduction 2025-12-04 23:41:46 +01:00
parent 2ce3be221a
commit ab0397878c
3 changed files with 7 additions and 24 deletions

View file

@ -121,14 +121,6 @@ public:
static String get_source_code(const String &p_path);
static Vector<uint8_t> get_binary_tokens(const String &p_path);
static Ref<GDScript> get_shallow_script(const String &p_path, Error &r_error, const String &p_owner = String());
/**
* Returns a fully loaded GDScript using an already cached script if one exists.
*
* If a new script is created, the resource will only have its patch_cache set, so it won't be present in the ResourceCache.
* Mismatches between GDScriptCache and ResourceCache might trigger complex issues so when using this method ensure
* that the script is added to the resource cache or removed from the GDScript cache.
*/
static Ref<GDScript> get_full_script_no_resource_cache(const String &p_path, Error &r_error, const String &p_owner = String(), bool p_update_from_disk = false);
/**
* Returns a fully loaded GDScript using an already cached script if one exists.
*