yasirkula / UnityIngameDebugConsole

A uGUI based console to see debug messages and execute commands during gameplay in Unity
MIT License
2.11k stars 221 forks source link

fix IndexOutOfRange Exception when AddCommand #44

Closed jeffgoku closed 3 years ago

jeffgoku commented 3 years ago

When there are invalid commands in the command list, add new command after those invalid commands will throw IndexOutOfRangeException

yasirkula commented 3 years ago

Actually, I've noticed that we don't need that for loop at all. I'm already checking for duplicate commands in the previous for loop and we don't have to remove invalid commands in AddCommand function.