Closed valkyrienyanko closed 8 months ago
Cannot create console commands in abstract classes
E 0:00:04:0457 :0 @ System.RuntimeType+ActivatorCache..ctor(System.RuntimeType ): System.MissingMethodException: Cannot dynamically create an instance of type 'SpaceGame.Ship'. Reason: Cannot create an abstract class. <C++ Error> System.MissingMethodException <C++ Source> :0 @ System.RuntimeType+ActivatorCache..ctor(System.RuntimeType ) <Stack Trace> :0 @ System.RuntimeType+ActivatorCache..ctor(System.RuntimeType ) :0 @ System.Object System.RuntimeType.CreateInstanceDefaultCtor(Boolean , Boolean ) UIConsole.cs:296 @ System.Object SpaceGame.UIConsole.GetMethodInstance(System.Type ) UIConsole.cs:143 @ Boolean SpaceGame.UIConsole.ProcessCommand(System.String ) UIConsole.cs:202 @ void SpaceGame.UIConsole.OnConsoleInputEntered(System.String ) LineEdit.cs:1377 @ void Godot.LineEdit.TextSubmittedTrampoline(System.Object , Godot.NativeInterop.NativeVariantPtrArgs , Godot.NativeInterop.godot_variant& ) DelegateUtils.cs:62 @ void Godot.DelegateUtils.InvokeWithVariantArgs(IntPtr , System.Void* , Godot.NativeInterop.godot_variant** , Int32 , Godot.NativeInterop.godot_variant* )
Can this restriction be lifted somehow?
https://stackoverflow.com/questions/60632841/system-missingmethodexception-cannot-create-an-abstract-class
Describe the Issue
Cannot create console commands in abstract classes
Exception
Question
Can this restriction be lifted somehow?