Open Seathus opened 3 years ago
Looks like we can't overload command methods. Is this intended? Error is thrown when I attempt to do so:
ArgumentException: An item with the same key has already been added. Key: setspell System.Collections.Generic.Dictionary2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) (at <9577ac7a62ef43179789031239ba8798>:0) System.Collections.Generic.Dictionary2[TKey,TValue].Add (TKey key, TValue value) (at <9577ac7a62ef43179789031239ba8798>:0) Lim.InGameConsole.IGC_Main.GetMethods (System.Reflection.Assembly assembly) (at Library/PackageCache/com.limjoshua.igconsole@c7a5120089/Runtime/IGC_Main.cs:101) Lim.InGameConsole.IGC_Main.Awake () (at Library/PackageCache/com.limjoshua.igconsole@c7a5120089/Runtime/IGC_Main.cs:45)
2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) (at <9577ac7a62ef43179789031239ba8798>:0) System.Collections.Generic.Dictionary
Commands need to situated in a unique class name and a unique method name within the class because it's stored in a dictionary by name. So as of now there is no overloading.
Looks like we can't overload command methods. Is this intended? Error is thrown when I attempt to do so:
ArgumentException: An item with the same key has already been added. Key: setspell System.Collections.Generic.Dictionary
2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) (at <9577ac7a62ef43179789031239ba8798>:0) System.Collections.Generic.Dictionary
2[TKey,TValue].Add (TKey key, TValue value) (at <9577ac7a62ef43179789031239ba8798>:0) Lim.InGameConsole.IGC_Main.GetMethods (System.Reflection.Assembly assembly) (at Library/PackageCache/com.limjoshua.igconsole@c7a5120089/Runtime/IGC_Main.cs:101) Lim.InGameConsole.IGC_Main.Awake () (at Library/PackageCache/com.limjoshua.igconsole@c7a5120089/Runtime/IGC_Main.cs:45)