Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Atom editor with Unity

Discussion in 'Formats & External Tools' started by LemonLimeGames, Jul 8, 2017.

  1. LemonLimeGames

    LemonLimeGames

    Joined:
    Jul 8, 2014
    Posts:
    23
    I use Atom.io as a text editor and Unity won't open files when I select it as my main text editor. It opens Atom, but a blank page, not the actual file.
     
  2. larku

    larku

    Joined:
    Mar 14, 2013
    Posts:
    1,422
  3. LemonLimeGames

    LemonLimeGames

    Joined:
    Jul 8, 2014
    Posts:
    23
  4. larku

    larku

    Joined:
    Mar 14, 2013
    Posts:
    1,422
    You'll need to give far more details if you're wanting help.

    How are you invoking it?
    What platform are you using?
    What version of Unity are you using?
    What have you tried?

    etc.
     
  5. LemonLimeGames

    LemonLimeGames

    Joined:
    Jul 8, 2014
    Posts:
    23
    That would probably help wouldn't it? I'm using Windows 10, unity 5.6. I went to preferences>external tools and changed the default text editor to Atom. I'm not sure if there are any other steps I need to perform?
     
  6. larku

    larku

    Joined:
    Mar 14, 2013
    Posts:
    1,422
    Can you show exactly how you're invoking it? What binary did you point it to?
     
  7. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,637
    @Sexy-Stache-Studios

    - Just asking,

    why not just use VS Code instead?

    Is it just that you want to use Atom instead ?
     
    Dulas_Jakub likes this.
  8. LemonLimeGames

    LemonLimeGames

    Joined:
    Jul 8, 2014
    Posts:
    23
    I apologize, I'm almost a complete Unity noob, you lost me there bud.

    Yeah, I just prefer Atom, I love its flexibility.
     
    VINTAGE_EYE_games likes this.
  9. mystman12

    mystman12

    Joined:
    Jul 20, 2017
    Posts:
    3
    I'm trying to do the same thing too. I want to use Atom just because I'm familiar with it, and Visual Studio just didn't run well at all. I've done exactly what the OP has, changed the default external script editor to "Atom.exe". When I try to open scripts, however, it opens Atom, but not with the script. The external script editor args box contains ""$(File)"". (The inner quotes included.) I have no idea what that means though, I'm a total noob to Unity as well.

    Edit: Wait, nevermind, the link larku posted is the solution. I was using the .exe in the "atom" folder, not the one in the folder for the latest version. Op, find the atom folder ("C:\Users\Username\AppData\Local\atom") and then continue to the folder named "app-1.##.#" with the highest number (My atom folder had "app-1.15.0" and "app-1.16.0". I used 1.16.)
     
    Last edited: Jul 20, 2017
    LemonLimeGames and larku like this.
  10. GamerWang

    GamerWang

    Joined:
    Jun 25, 2017
    Posts:
    1
    Edit-Preferences-External Tools
    open External Script Editor and find atom root
    replace the default External Script Editor Args with this: n -a "$(ProjectPath)" "$(File)"
    hope it helps
     
    Overnaut and LemonLimeGames like this.
  11. Overnaut

    Overnaut

    Joined:
    Aug 25, 2017
    Posts:
    19
    I did exactly this, path to atom 1.19.2 x64 on Ubuntu 17.04 is:
    Code (csharp):
    1. /usr/bin/atom
    and I use Unity 3D 2017.2 for Linux which worked fine. But now I cannot edit my scripts, nothing happens on selection, double click, or open. But it gets worse, when I change the editor back to MonoDevelop (buildin) still nothing is happening on open script.

    I remember before any change only internal was selected as External Script Editor but now I only can choose between MonoDevelop (buildin) and atom.
     
    Last edited: Aug 25, 2017
    Ekwav likes this.
  12. dlurner

    dlurner

    Joined:
    Jan 5, 2018
    Posts:
    1
    To get it working on macOS (10.13.2) I:
    1. Used Atom 1.23.1 (the version Ihad installed) and Unity 2017.3.0f3 Personal.
    2. In Unity > Preferences (Edit > Preferences on Windows IIRC) on the External Tools tab I selected Atom by choosing the Browse… item from the External Script Editor dropdown menu and navigating to the Atom app (/Applications/Atom.app) in the file picker. At this point you can test and Unity should launch Atom, but Atom won't open with your file.
    3. To get it to open your file you need to set the External Script Editor Args, I used the arguments suggested by @GamerWang but added a leading dash before the 'n' – I'm pretty sure the omission was a "cut-and-paste o" in their post. My final preferences ended up looking like this: Screen Shot 2018-01-06 at 2.05.04 PM.png
     
    Last edited: Jan 7, 2018
    Lars-Steenhoff likes this.
  13. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,637
    hi,

    I have been following this thread...

    In December I started to have problems with VS Code + autocomplete (something with omnisharp), so I decided to try Atom. I do use it occasionally for other stuff.

    I thought I'd need omnisharp for Atom/C# unity auto completion... I didn't find much info about this, so I just went ahead and installed it.

    However, I get errors related to omnisharp, when I open Atom. Same happens if I open C# file from Unity with Atom as external editor.

    "Uncaught TypeError: atom.grammars.startIdForScope is not a function..."

    I'm using latest Atom 1.24.0-beta2 x64, Win10 Pro, Unity 2017.3.0p1
     
  14. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,637
    ...Bump

    Anyone actually got Atom working properly with OmniSharp now in 2018?

    I've tried Atom 1.23.3 / omnisharp-atom 0.31.2 / Windows 10 Pro x64

    Does not seem to be working, can't get the omnisharp icon turn green / activate omnisharp.

    If I try to Start / restart Omnisharp in Atom, I get the previously mentioned Uncaught TypeError.

    And like I mentioned, in the latest Atom 1.24.0-beta2 or 1.24.0-beta3 x64 - Same thing, omnisharp does not start, but different error message.

    I've also tried Sublime Text 3, in it's implementation omnisharp works just fine. I can get autocomplete/intellisense stuff, and omnisharp commands too work. So maybe Sublime Text addon does something differently.
     
  15. Overnaut

    Overnaut

    Joined:
    Aug 25, 2017
    Posts:
    19
    I managed to work with the Atom Editor and Unity on Windows 10, due to unvesolvable Unity Linux Editor bugs, when I enter in
    Code (CSharp):
    1. Unity/Edit/Prefences/External Tools
    under External Script Editor:
    Code (CSharp):
    1. C:\Users\MY_USERNAME\AppData\Local\atom\atom.exe
    and paste in External Script Editor Args:
    Code (CSharp):
    1. -n -a "$(ProjectPath)" "$(File):$(Line)"
    /Edit: Line support, just double click on the error console to open the file on the line where error occurs.
     
    Last edited: Jan 31, 2018
    epiccharliegao likes this.
  16. obuga

    obuga

    Joined:
    Sep 3, 2019
    Posts:
    3
    So I was having problems with opening Atom when double clicking on a cs file in Unity, even after having this arguments:
    Code (CSharp):
    1. -n -a "$(ProjectPath)" "$(File):$(Line)"
    What solved the problem, is removing the "-a" argument. So now it looks like:
    Code (CSharp):
    1. -n "$(ProjectPath)" "$(File):$(Line)"
    Atom version: 1.40.1
    Unity vesion: 2019.2.4f
     
  17. AbatureStudio

    AbatureStudio

    Joined:
    Dec 1, 2019
    Posts:
    6
    Was having the same problem and that fixed it for me, thanks!
     
  18. Matdrox

    Matdrox

    Joined:
    Aug 21, 2017
    Posts:
    3
    I managed to simply kill the "Atom" task from the task manager then it worked as intended.
     
  19. magnet-net

    magnet-net

    Joined:
    Mar 31, 2020
    Posts:
    1
    -n "$(File)"

    With this script, it worked fine.
    Atom version: 1.45.0
    Unity vesion: 2019.2.19f1
     
  20. Dextozz

    Dextozz

    Joined:
    Apr 8, 2018
    Posts:
    493
    Anyone managed to make omnisharp work?

    Sorry for reviving this, it's still an issue.
     
  21. chrysl666

    chrysl666

    Joined:
    May 27, 2020
    Posts:
    1
    working as intended.
    Installed Unity Atom Packages
    upload_2021-1-14_23-40-52.png

    Atom version:
    upload_2021-1-14_23-37-31.png

    Unity Version :
    upload_2021-1-14_23-38-14.png
    my Setup : path to Atom in my system is /usr/bin/atom
    upload_2021-1-14_23-35-6.png
     
  22. Steedalion

    Steedalion

    Joined:
    Jul 6, 2020
    Posts:
    51
    If you are using linux, this omnisharp error is solved by installing the latest version of mono (6.4 I think). I found this with VS Code but it should be the same for Atom.

    P.S. This has really been a pain in my ass because mono causes my pc to do weird sh!t. The CD rom keeps opening and playing random music. I wouldn't go near it with a screw driver. I have moved to script inspector 3 as it uses the Unity internal libraries, no extra installs. I don't advise SI3 for code heavy projects.
     
  23. EctoLounge

    EctoLounge

    Joined:
    Feb 17, 2020
    Posts:
    4
    update for recent ubuntu 20.04 + unity3d 2020x.x + atom

    installed atom with snap (snap install atom --classic)
    added atom as default editor by locating it : path to snap file is /snap/bin/atom
    added custom script editor args in unity: -n $(ProjectPath) $(File):$(Line)
    works as a charm now :)
     
    Steedalion likes this.
  24. EctoLounge

    EctoLounge

    Joined:
    Feb 17, 2020
    Posts:
    4
    Just to update, something that bugged me. the -n arg is opening new window. If you are fine with with opening a new session of atom every time you click a script in unity editor, then leave it as is, if you already have your editor open, and just want that one session, then remove the -n tag
     
  25. FarhezAhmed

    FarhezAhmed

    Joined:
    Dec 15, 2020
    Posts:
    17
    no still not working
     
  26. shreyshukladm

    shreyshukladm

    Joined:
    Mar 15, 2021
    Posts:
    1
    1. -n "$(ProjectPath)" "$(File):$(Line)" this works in my case and also download unity packages
     
  27. burningman2k12

    burningman2k12

    Joined:
    Nov 24, 2012
    Posts:
    9
    for windows, especially anyone using windows 11 (insider preview) anyways you need to remove the quotes otherwise it wont work properly.
     
    maxizrin and CerealChillz like this.
  28. CerealChillz

    CerealChillz

    Joined:
    Oct 9, 2021
    Posts:
    1
    Yes, this worked finally and I'm using windows 10.
     
  29. aftervision21

    aftervision21

    Joined:
    Sep 7, 2022
    Posts:
    1
    Autocomplete-unity is working but some recommendation is not working
    example : gameobject is working but . Movetowards is not recommenting.
    Please give some answers