Page 1 of 1

Is it possible to get code-completion for both C# and resource dictionaries when using Unity + VS Code?

Posted: 29 Mar 2023, 13:24
by asusralis
I wasn't able to find any information about this on this website. I can open the asset folder using VS Code and get code-completion related to XAML, but it doesn't recognize my resource dictionaries or anything in code-behind for C#. Is this not possible right now? Or is there something specific to do for this?

Re: Is it possible to get code-completion for both C# and resource dictionaries when using Unity + VS Code?

Posted: 29 Mar 2023, 16:20
by jsantos
it doesn't recognize my resource dictionaries or anything in code-behind for C#
Unity editor must be opened at the same time, and VsCode at the lower-right corner must say "Noesis [Unity]". At that point, all your classes and extensions must be properly autocompleted by VsCode.

Completion for markup extensions ("{", bindings) or dictionaries is still not implemented. It is in the roadmap, but please, feel free to create a ticket to track this feature.

Re: Is it possible to get code-completion for both C# and resource dictionaries when using Unity + VS Code?

Posted: 30 Mar 2023, 14:43
by asusralis
So it's not possible to use VS for Unity & VS Code for XAML? I still use VS because debugging doesn't really work with VS Code. I see when I choose my editor to VS Code in Unity & use 'open c# project' the code-behind then works.

I submitted a ticket for the completion.

Re: Is it possible to get code-completion for both C# and resource dictionaries when using Unity + VS Code?

Posted: 05 Apr 2023, 14:02
by jsantos
Yes, you can use VS for Unity & VS Code for XAML.

The only restriction is that when you use of VsCode extension, Unity editor must be opened.

Thanks for the ticket! (#2551)