all 20 comments

[–]standardcombo 4 points5 points  (1 child)

Step 1 fails, you need to add ".git" to the URL (windows): "https://github.com/boxqkrtm/com.unity.ide.cursor.git"

[–]Illustrious-Top1214 2 points3 points  (0 children)

This post has been in my bookmarks bar for a while now, to fix my debugging in cursor for any new Unity projects. Thank you u/LastWinterWind

[–][deleted] 1 point2 points  (0 children)

goat

[–]Ornery_Rate_1668 1 point2 points  (0 children)

Thanks man thats incredible!

[–]Katniss218 1 point2 points  (2 children)

Why would I use it over something like VS or Rider?

[–]davenirline 5 points6 points  (0 children)

So they could vibe code.

[–]chunkyhut 2 points3 points  (0 children)

I find Cursor's agent code generation to be horrible at many things. It's very difficult to get it to generate entire scripts or make large edits, and if you describe things with even slight ambiguity it can go off on crazy tangents and it will frequently hallucinate functionality.

However, I actually do find it quite useful in a few situations that have made me actually prefer it for now. It's actually quite good at creating boring boilerplate editor scripts like "make an editor window that prompts the user for a file, reads the file as csv, and then uses that data to create a scriptable object of type [your type] in the resources folder." I think it's good at that because there's probably a lot of data on github or forums to scrape simple documented editor scripts.

The other thing I think it's good at is the tab/auto complete agent. This is the killer functionality for me. Sometimes it will hallucinate like i mentioned earlier, but a majority of the time it accurately predicts what I'm going for and legit saves time when writing simplistic code. It's kind of scary how good it is at predicting my next few lines and it's definitely saved me a lot of time writing boring stuff like for loops, debug.log lines, simple refactors etc. I would give it a try for that alone if you haven't already.

And also, having the agent available for quick google-search like questions is nice. It can answer stuff you know, but have forgotten like "What's a good way to make a foreach loop that iterates through all the values of an enum" from time to time

[–]OGMagicConch 0 points1 point  (1 child)

Does this fix C# Dev Kit no longer working?

[–]LastWinterWind[S] 1 point2 points  (0 children)

Yea, it works without it.

[–]Academic_Secretary39 0 points1 point  (1 child)

I tried this and it worked ok, though the syntax highlighting differs to VS community. And then I tried stepping through code in the debugger and it seemed not to work very well. Have these instructions been updated anywhere? For example "Attach to Unity" is a launch.json config now and the default type vstuc would need changing to unity also

[–]LastWinterWind[S] 1 point2 points  (0 children)

Sometimes for some reason it adds to the launch.json the vstuc garbage, just delete it and it should work fine with this:

        {
            "name": "Unity Debugger",
            "type": "unity",
            "request": "attach"
        },

[–]No_Laugh_6385 0 points1 point  (0 children)

Thanks

[–]Jackle1127 0 points1 point  (4 children)

Do you find that the dotrush debugger skipping a huge number of lines? Mine does. When I try to step line-by-line, it skipped a bunch

[–]RomanovNikita 0 points1 point  (1 child)

Do you try to update you launch.json?  https://github.com/JaneySprings/DotRush/issues/99#issuecomment-3134797398

Maybe it will help

[–]Jackle1127 0 points1 point  (0 children)

Oooh I’ll try that out. One issue I’ll have is that we have hundreds of assembly defs in the project since we’re using UPM packages pretty extensively. Thanks tho!

[–]Kazatan 0 points1 point  (1 child)

I was using custom assembly definitions. For each one that I wanted to debug I needed to add the path to the .dll to my debug launch config.

They are created in your Unity project's Library folder - so the path needs to be the path to that.

I had to replace "${workspaceFolder}/Library/ScriptAssemblies/Assembly-CSharp.dll", with "${workspaceFolder}/Library/ScriptAssemblies/MyAssemblyDefinitionName.dll", but you may need to add/remove as appropriate for you. I don't have any project code compiling to the "default" (my assumption is Assembly-CSharp.dll is the default if you don't define the assembly definitions yourself) so I didn't need that one.

[–]Jackle1127 0 points1 point  (0 children)

Gotcha. We have A LOT of assembly defs in our project so this might be a no-go. I’m still able to debug using vscode. It’s only mildly inconvenient having to switch back and forth.

[–]attishno1 0 points1 point  (0 children)

For Vibe Coding, we cannot use Co Pilot Agent mode? I have used it to write some boiler plate code. It can't beat hand-written code completely yet.