You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-10 13:00:37 +00:00
Merge pull request #65266 from raulsntos/dotnet/reload-non-tool-scripts
Create script instance of reloaded scripts even if they're not tools
This commit is contained in:
@@ -130,7 +130,6 @@ namespace Godot.Bridge
|
||||
{
|
||||
// Performance is not critical here as this will be replaced with source generators.
|
||||
Type scriptType = _scriptTypeBiMap.GetScriptType(scriptPtr);
|
||||
var obj = (Object)FormatterServices.GetUninitializedObject(scriptType);
|
||||
|
||||
var ctor = scriptType
|
||||
.GetConstructors(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance)
|
||||
@@ -151,6 +150,8 @@ namespace Godot.Bridge
|
||||
}
|
||||
}
|
||||
|
||||
var obj = (Object)FormatterServices.GetUninitializedObject(scriptType);
|
||||
|
||||
var parameters = ctor.GetParameters();
|
||||
int paramCount = parameters.Length;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user