Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Feature Request Default interface method, code completion and quick fixes

Discussion in 'Code Editors & IDEs' started by Laicasaane, Jun 1, 2023.

  1. Laicasaane

    Laicasaane

    Joined:
    Apr 15, 2015
    Posts:
    378
    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).
     
  2. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,451
    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.

    Code (csharp):
    1. public interface MyInterface
    2. {
    3.     public void Foo() { }
    4. }
    5.  
    6. internal class Program : MyInterface
    7. {
    8.     static void Main(string[] args)
    9.     {
    10.         Console.WriteLine("Hello, World!");
    11.     }
    12. }

    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.
     
    Laicasaane likes this.