Fixes several moves
This commit is contained in:
@@ -58,7 +58,7 @@ public class ScriptRegistry
|
||||
var constructor = type.GetConstructor(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance,
|
||||
null, Type.EmptyTypes, null);
|
||||
if (constructor == null)
|
||||
throw new ArgumentException($"Type {type} does not have a parameterless constructor.");
|
||||
return;
|
||||
|
||||
// We create a lambda that creates a new instance of the script type.
|
||||
// This is more performant than using Activator.CreateInstance.
|
||||
|
||||
Reference in New Issue
Block a user