asusralis
Topic Author
Posts: 152
Joined: 30 Jul 2018, 05:03

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

29 Mar 2023, 13:24

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?
 
User avatar
jsantos
Site Admin
Posts: 4822
Joined: 20 Jan 2012, 17:18
Contact:

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

29 Mar 2023, 16:20

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.
 
asusralis
Topic Author
Posts: 152
Joined: 30 Jul 2018, 05:03

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

30 Mar 2023, 14:43

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.
 
User avatar
jsantos
Site Admin
Posts: 4822
Joined: 20 Jan 2012, 17:18
Contact:

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

05 Apr 2023, 14:02

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)

Who is online

Users browsing this forum: Bing [Bot] and 7 guests