After Following the lecture on inverting dependencies using Interfaces, I have found myself stuck with an error (four times, but the same error) in the unity editor, all referencing the mention of “IAction”. VScode doesn’t seem to find any problems, but unity is stuck with these messages:
I understand what that error usually means (I forgot to mention “using (namespace)” in the script. However I followed all the directives, even watched the whole lecture again to make sure I hadn’t missed anything.
Here are my different classes and their Cancel() methods.
Mover:
Given that it’s a fairly simple error usually, I feel like I’ve missed something obvious here, but I can’t find what it is. I have tried many solutions proposed online, but nothing is working.
That’s great. It’s amazing how a bug in Unity that has been identified well over six years ago still rears it’s ugly little head. It’s rare that it happens, but when it does, you’ll see things like this. Usually the mismatch is the other way around, where Visual Studio (especially Visual Studio Code) flags errors that aren’t errors. The common solution for that is regenerating the project files.