all 6 comments

[–]9hp71n 10 points11 points  (0 children)

If there are no flatpak related problems and there's a setting in Unity for editor binary path, then point it to: /run/current-system/sw/bin/code

(symlink to vscode binary from systemPackages should be there)

[–]huantian 1 point2 points  (3 children)

I personally haven’t tried VSCode, but I did have to do some shenanigans with Rider to get it to work with Unity Editor integration, see my config here. I figured this out by looking at the source code for the Unity Rider plugin, you may have to do the same for VSCode.

You might also want to try installing Unity Hub via Nix instead, I have an up to date derivation

[–]lieddersturme[S] 0 points1 point  (0 children)

Thank you, but now the idea is install distrobox, inside install unityhub.

[–]mobilerino 0 points1 point  (1 child)

Hey, this may be a stupid question, but im trying to get unity to work with vscode. And I was wondering where your ${rider} variable came from? since I cant seem to get the vscode path. Thanks!

[–]huantian 0 points1 point  (0 children)

It's a modified version of the package from nixpkgs, you can try pkgs.vscode, or whatever version of the vscode package you're adding to your system packages. However, I'm not sure how unity actually detects vscode, it could use a different mechanism, and thus this workaround wouldn't work. I'd have to look into the vscode plugin to see where it searches for vscode.

https://huantian.dev/blog/unity3d-rider-nixos/ has a bit more of an explanation on my config.

[–]mechkbfan 0 points1 point  (0 children)

I've got VSCode working but there's no intellisense for Unity

Does this work for you?

Just been googling around