nvim-unity icon indicating copy to clipboard operation
nvim-unity copied to clipboard

Error on Unity version 6 and 6.1 - not all code paths return a value

Open protatorian opened this issue 1 year ago • 2 comments

Platform: Windows 11 Editor version: 6000.0.32f1, 6000.1.3f1

Image

Not tested on earlier versions.

Adding return codes to each functions fixed the problem and works well. ('Neovim Code Editor' doesn't show up in 'External Tools' menu unless the errors are removed.)

protatorian avatar May 16 '25 14:05 protatorian

@protatorian, Were you able to open scripts in Neovim after fixing these errors? I just started trying Neovim with Unity for the first time, and I've noticed that after fixing the errors that you mentioned above, Neovim appears in the external tools menu, but nothing happens when I try to open my scripts. The terminal window briefly appears and then immediately disappears

streaminspace avatar May 16 '25 14:05 streaminspace

@streaminspace If you're using windows terminal, you can leave it open even when error occurs. Find "Settings -> Default profile -> Advanced settings -> Profile terminate behavior" and pick the one that says something like "Do not close automatically." (These menu names could be different because my environment is not in English. I just translated myself.)

Then you'll see the error message. If it says it can't find the path to the file or something like that, try to fix the path to neovim to "C:\Program Files\Neovim\bin\nvim.exe" and make sure the path is on environment variable. (or just replace line 57 in Utils.cs with your neovim path. The path to neovim is hard coded.)

This was my case and I hope this can fix your problem as well.

protatorian avatar May 16 '25 16:05 protatorian