Default interface method, code completion and quick fixes

I don’t know if I’m the only one, because for me this is getting too annoying.

ISystem methods are DIMs now and I can’t get OnCreate and OnUpdate quickly generated for me by Visual Studio Quick Fixes anymore. There is also no code completion support, like the feature for MonoBehaviour messages (Start, Awake, Update, etc). Currently I have to copy-paste or rely on manual typing when implement ISystem. And for ECS, there would be a lot of systems so this labour is starting to get on my nerve.

Please, I would like to have IDE feature that help me quickly implement ISystem methods (and DIMs in general).

On a hunch that this might not be Unity I tried creating a C# console app in VS 2022, gave it the following code, and opened the quick fix list to see if it would give me the option and it doesn’t.

public interface MyInterface
{
    public void Foo() { }
}

internal class Program : MyInterface
{
    static void Main(string[] args)
    {
        Console.WriteLine("Hello, World!");
    }
}

A little bit of searching later and I came across an issue on the Roslyn Github where this was requested but closed with the statement that this is working as intended.

https://github.com/dotnet/roslyn/issues/36505

Since this appears to be a limitation of the IDE I’m going to request the next best thing: script templates. We have them for MonoBehaviour classes. We need them for DOTS too.

1 Like