Merge pull request #83249 from zaevi/fix_csharp_lookup_singleton_instance

C#: Fix lookup for singleton instance types.
This commit is contained in:
Rémi Verschelde 2023-10-13 22:17:50 +02:00
commit 68cc80ee58
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -280,7 +280,7 @@ namespace Godot.Bridge
if (wrapperType != null && IsStatic(wrapperType))
{
// A static class means this is a Godot singleton class. Try to get the Instance proxy type.
wrapperType = TypeGetProxyClass($"{nativeTypeNameStr}Instance");
wrapperType = TypeGetProxyClass($"{wrapperType.Name}Instance");
if (wrapperType == null)
{
// Otherwise, fallback to GodotObject.