Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

❤️ uCodeEditor - A lightweight code editor in Unity Editor

Discussion in 'Assets and Asset Store' started by Amlovey, Apr 27, 2018.

  1. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    219
    Not sure if there are callback after "Show Generated Codes" button clicked we can use. If yes, i will add it in next release.
     
  2. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    219
    Hi Gekigengar, I checked the implementation of Unity Shader Inspector, and there are no callbacks of "Show Generated Codes" button. Unfortunately uCodeEditor cannot support that I think.
     
  3. quincyHuang

    quincyHuang

    Joined:
    May 30, 2013
    Posts:
    10
    Outline??? 4 stars so far. hmmm. May need that.
     
  4. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    219
    Hi @quincyHuang,

    Outline feature is available. You may try the commands in Command Palette whose name start with 'Fold', like "Fold All".

    And about another question from you. The 'Create New Window' command in Command Palette will create a new instance of uCodeEditor, we can dock it to Unity Editor.
     
    quincyHuang likes this.
  5. quincyHuang

    quincyHuang

    Joined:
    May 30, 2013
    Posts:
    10
    Thanks, so quick. I will try that.
     
  6. joshcamas

    joshcamas

    Joined:
    Jun 16, 2017
    Posts:
    1,119
    Is it possible to add my own language? I have my own language + editor, but am unhappy with the editor. Would I be able to use the code area in my own window? (Basically is this code accessible and somewhat modular)
     
  7. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    219
    Hi @joshcamas,

    I'm not fully understand your question. Do you mean add the code editor to your window?
     
  8. joshcamas

    joshcamas

    Joined:
    Jun 16, 2017
    Posts:
    1,119
    Yes, I believe so ☺️
     
  9. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    219
    There are no such feature for now. But it's possible (to add new language and to code area to other window).
     
    joshcamas likes this.
  10. ckonteos

    ckonteos

    Joined:
    Nov 22, 2019
    Posts:
    2
    Having the same issue as yomilonge, cant seem to find any reply to this. I am on Unity 2019.2.12f1.
    Please help
     
  11. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    219
    Hi,

    Tomilonge and me have communicated offline so there are no updates here.

    What’s your OS version and Unity version? If Unity 2019 on Windows, it might be .Net 4.7 issue and can be fixed by installing
    https://www.microsoft.com/en-us/download/confirmation.aspx?id=56119
     
  12. ckonteos

    ckonteos

    Joined:
    Nov 22, 2019
    Posts:
    2
    Hi Amlovey,
    I installed the .NET framework you suggested but it didnt work. I am running windows 8.1 and Unity 2019.2.12f1.
     
  13. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    219
    Have you try it on an empty project? If not, may I ask you try, it will check whether there are something in project will break the Omnisharp workflow or not.
     
  14. chrisk

    chrisk

    Joined:
    Jan 23, 2009
    Posts:
    692
    Hi, I'm using Rider as my main editor and want to use uCode Editor as a quick editor inside of Unity.
    But it seems like uCode Editor wants to be the main editor.

    What I would like uCode Editor to replace Inspector, meaning, Single-Click to show the code in the uCode Editor, and Double-Click to go to Rider. Is it possible to configure it as such?

    Thanks.
     
  15. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    219
    Hi chrisk,

    Unfortunately, uCodeEditor has no such feature now. I can say its possible to do that but due to uCodeEditor base on webview in UnityEditor, the loading performance will be very bad. That's why there are no Inspector replacement feature in uCodeEditor.
     
  16. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    219
    As workaround for now, you may try below steps:

    1. Use 'Toggle uCodeEditor Association' command to turn off uCodeEditor association for double click
    2. Set Rider as external tool for script editing, double click should be go to rider now.
    3. Instead of Single-Click to show in code in uCodeEditor, we can use the 'Open in uCodeEditor' menu in context menu after right click the Project Window.
     
  17. chrisk

    chrisk

    Joined:
    Jan 23, 2009
    Posts:
    692
    Thanks. Will you please put the support for single click to replace Inspector?
    The current Inspector code preview is pretty much useless.

    Cheers!
     
  18. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    219
    May be not for now due to performance issue of Unity Editor builtin webview. But once the issue resolved I will add it.
     
  19. chrisk

    chrisk

    Joined:
    Jan 23, 2009
    Posts:
    692
    Hi, Thanks. I'll wait until you replace the Inspector.

    BTW, uCodeEditor seems to delete all .csproj files and I can't use it with Rider with the "toggle uCodeEditor Association" trick above.
     
  20. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    219
    Have you set the Rider as External script editor in Unity Editor Perferences Window? If yes, try modify the line 192 of Onload.cs from

    Code (CSharp):
    1. FileWatcher.SyncSolution(false);
    to

    Code (CSharp):
    1. #if !DISABLE_UCE_ASSOCIATION
    2. FileWatcher.SyncSolution(false);
    3. #endif
    and try again.
     
  21. chrisk

    chrisk

    Joined:
    Jan 23, 2009
    Posts:
    692
    Hmm.. I tried it but it deletes the whole csproj files and recreates it each time I recompile.
    Rider is also refreshing each time I compile and it makes it pretty much unusable.

    I'm not sure how many people are trying to use uCodeEditor the only code editor but I think it's more common for people to use it as a supplementary editor, in my case to replace Inspector preview and use it as quick editor.
    If you agree, there should be more care how uCodeEditor can coexist with other editors.

    Thanks.
     
  22. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    219
    Yes, i have create an todo item to improve it. The delete project actions are executed in the FileWatcher.SyncSolution() method, comment it out will disable the delete actions.
     
  23. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    219
    Hi @chrisk,

    I have made some improvements to make uCodeEditor coexist with other editors better. Would you mind send me an email, so that I can send your a new package for testing before it's available on AssetStore?

    My email is amlovey@qq.com
     
  24. esteban16108

    esteban16108

    Joined:
    Jan 23, 2014
    Posts:
    124
    @Amlovey Hi, just bought uCodeEditor and I can't make Go To Definition, Find all References work... Installed that Net package you linked, and OmniSharp is running in the background, tested with 2 different projects 1 medium 1 really small.

    Unity 2019.2.15f1
    Windows 10 Home
     
  25. esteban16108

    esteban16108

    Joined:
    Jan 23, 2014
    Posts:
    124
    Just tested with a new fresh project no extra assets added, only uCodeEditor and still doesn't work.

    upload_2019-12-27_21-46-53.png

    Any idea?

    Unity 2019.2.15f1
     
    linojon likes this.
  26. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    219
    Hi @esteban16108

    Thank your for purchasing and feedback. May I ask you provide me uCodeEditor logs By following below steps.

    1. Close all Unity Editor instances if there are unity running
    2. Create an empty project and import uCodeEditor
    3. Restart Unity
    4. Open a uCodeEditor and press F1 to open command palette
    5. Execute command ‘Omnisharp: Get All Log’ and then send log to my email amlovey@qq.com.

    And btw, please help me check if the port 8188 is not blocked by firewall on your machine. Thank you.
     
  27. esteban16108

    esteban16108

    Joined:
    Jan 23, 2014
    Posts:
    124
    @Amlovey 'Omnisharp: Get All Log' is empty. My firewall is OFF.

    Port 8188

    upload_2019-12-28_9-19-30.png
     
  28. esteban16108

    esteban16108

    Joined:
    Jan 23, 2014
    Posts:
    124
  29. esteban16108

    esteban16108

    Joined:
    Jan 23, 2014
    Posts:
    124
    I found this error:

    Code (CSharp):
    1. {"Event":"Error","Body":{"Text":"System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Build, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.\r\nFile name: 'Microsoft.Build, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'\r\n   at OmniSharp.MSBuild.ProjectFile.ProjectFileInfo.Load(String filePath, ProjectLoader loader)\r\n   at OmniSharp.MSBuild.ProjectManager.LoadOrReloadProject(String projectFilePath, Func`1 loadFunc)\r\n\r\nWRN: Assembly binding logging is turned OFF.\r\nTo enable assembly bind failure logging, set the registry value [HKLM\\Software\\Microsoft\\Fusion!EnableLog] (DWORD) to 1.\r\nNote: There is some performance penalty associated with assembly bind failure logging.\r\nTo turn this feature off, remove the registry value [HKLM\\Software\\Microsoft\\Fusion!EnableLog].\r\n","FileName":"C:\\UnityProjects\\Test uCodeEditor\\Assembly-CSharp.csproj","Line":1,"Column":1},"Seq":18,"Type":"event"}
    But the file is there in the project ->

    upload_2019-12-28_9-39-47.png
     
  30. GoldFireStudios

    GoldFireStudios

    Joined:
    Nov 21, 2018
    Posts:
    82
    Is there a way to use a different editor when this is installed in a project? I'm trying to switch back and forth with uCodeEditor and VSCode, but when I selected VSCode in the Unity preferences, it just changes back automatically and won't let me use anything but uCodeEditor. The last changelog says that it plays nicer with other editors now, but I'm not sure what that actually means.
     
  31. ArcherSS

    ArcherSS

    Joined:
    Apr 7, 2018
    Posts:
    20
    Hi, is there any chance to support vim input mode in this plugin? That is the only reason I still need use VS or VSCode as code editor. If so, I can totally work just inside Unity, that's very cool.
     
  32. Lunar-Ladder

    Lunar-Ladder

    Joined:
    Oct 15, 2019
    Posts:
    4
    Did you find a solution for the Go To Definition (and all related namespace features) not working...? I purchased this editor asset from the store just some moments ago, and unfortunately... only found out about this issue after observing it first hand :oops:. "No definition found" for everything, no code completion for any other classes I have in the project, etc...

    Edit: Amlovey kindly offered me a refund after I described the issue. Thank you, and I'm wishing you all the best with this. Hopefully it will continue to develop and gets popular, and I'll get to use it on another system at some point again.
     
    Last edited: Feb 14, 2020
  33. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    219
    Sorry response late, not sure why there are no notification emails of new post from Unity forum now.

    Try the command `Toggle uCodeEditor Association` to disable uCodeEditor association. After it's disabled, uCodeEditor will allow change external editor in Unity Perferences. After that, double click scripts will open the external editor we selected in Unity Perferences. If we want to open scripts file in uCodeEditor, we can use `Go To File` feature of uCodeEditor or right click context menu item `Open In uCodeEditor`.
     
  34. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    219
    Unity have many shortcuts and it's very possible that shortcut conflict exist between vim input mode and unity editor. Since unity is the host application, we have to adjust shortcuts of vim input mode, but if shortcuts of vim input mode are changed, it's not vim again...
     
  35. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    219

    Hi Matti, I don't even know this post exists because there are no new post notification email sent to my email box from Unity forum these days. I have reply your email. You may check it.
     
  36. Lunar-Ladder

    Lunar-Ladder

    Joined:
    Oct 15, 2019
    Posts:
    4
    :) thanks!
     
  37. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,614
    Is there a reason for the download to be 66mb? Is there a way to strip some of it out?
     
  38. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    219
    Sorry for response late. The packages contains three version of Omnisharp binaries (x86 and x64 for windows, and the other one is for macOS). The binaries are about 50M and included in the package to avoid possible network issue (users may have different network environments).
     
  39. linojon

    linojon

    Joined:
    Aug 25, 2014
    Posts:
    115
    hello i just purchased and installed uCodeEditor (with Unity 2019.3.13f1). I've checked all the Settings checkboxes. It does not autocomplete or find references or definitions of my symbols, etc.
     
  40. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    219
    Hi,

    What's your OS are you using? Would you mind drop me an email to amlovey@qq.com. Unity forum don't have notification for me now, i'm not sure why...
     
  41. LiLyDarcy

    LiLyDarcy

    Joined:
    Oct 10, 2018
    Posts:
    8
    upload_2020-6-28_14-47-43.png
    upload_2020-6-28_14-47-57.png
    Why is there no prompt?
     
    Amlovey likes this.
  42. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    219
unityunity