Cursor with Unity

Hi. I’m a Unity developer making mobile games. I was using chatGPT for coding for a while and Rider as IDE but your editor seems to be a good alternative
But I really miss some introduction videos to get started. I can ask questions in the chat and code is produced but it’s almost same as using chatGPT in browser. Here’s what i want

  1. Make cursor read the whole project (or folder) not a single script to understand dependencies
  2. Be able to create new files (scripts) in the project automatically if chatGPT suggests it
  3. Automatically apply changes that chatGPT suggests to the code
    Any help is appreciated!
4 Likes

Hi have you tried it in unity by now? If yes, how did you manage to sync them, I added it to the unity external tools but whenever I double click an error in the Console it will just open the script but not open and go to the line that has error, and it doesn’t know it has error because there’s no red underline.

Someone has already created a plugin. You can import it with one click through the package manager.

boxqkrtm/com.unity.ide.cursor: Code editor integration for supporting Cursor as code editor for unity. Adds support for generating csproj files for intellisense purposes, auto discovery of installations, etc. :package: [Mirrored from UPM, not affiliated with Unity Technologies.] (github.com)

4 Likes

I haven’t tried the linked extension above, but my main concern with it is: will the dev stay on top of maintenance? There’s nothing more frustrating that having core feature of your IDE stop working :sweat_smile: I’d rather see an official plugin from Unity or Cursor.

However a viable workaround I’ve been using for now is having Unity still pointed at VSCode as its external script editor. That way it will generate the .csproj files Cursor needs for intellisense. The only downside is that opening a script within Unity will open VSCode instead.

It is very simple.

  1. Open the Unity Project. Edit > Preferences > External Tools > External Script Editor > Cursor (If you don’t see Cursor listed, just find and select “Cursor.exe” by browsing).
  2. Assets > Open C# Project.

Thats it