Search Unity

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:
    253
    uCodeEditor is a lightweight code editor inside Unity Editor. It supports C# and shaderlab with great editing features, including Syntax Highlighting, Code Complete, Auto Format etc.

    uCodeEditor is built on Monaco Editor, which is code editor powers Visual Stuido Code, you may get similar coding experiences in uCodeEditor compared with VSCode.



    Asset Store:

    https://assetstore.unity.com/packages/tools/visual-scripting/ucodeeditor-117349

    Or Buy in MianBaoDuo (China Only) with lower price.

    Language Support:
    屏幕快照 2018-08-28 15.18.07.png

    Video Preview:




    More videos, please visit here.

    Main Features:
    ■ Supports C# with many editing features powered by Omnisharp
    ■ Supports Shaderlab with all language features of ShaderlabVSCode
    ■ Markdown preview and syntax highlighting
    ■ Supports syntax highlighting for xml, c, c++, lua, python, object-c, swift, java, css and html
    ■ Coding improvements for Unity, like code snippets for Unity magic methods.
    ■ Customization. Supports color themes customization, shortcut customization, code minimap, code indent guides etc.

    More details please visit online documents or read this PDF.
     
    Last edited: Oct 21, 2019
    mgear likes this.
  2. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    253
    Hi Guys,

    First beta release was submitted to Asset Store.
     
    Last edited: May 17, 2018
  3. sledgeman

    sledgeman

    Joined:
    Jun 23, 2014
    Posts:
    389
    Holy S***....this is what i was waiting for countless years ! Great job man! When do you think will it be released ?
     
  4. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    253
    Thank you. I'm glad to hear you like it. And if you want get beta package, pm me with your email or drop an email to me (amlovey@qq.com), I will send it to you.

    And for the release date. its up to Asset Store review team since I have already submitted for review. I guess it may be next week.
     
  5. somosky

    somosky

    Joined:
    Feb 15, 2014
    Posts:
    138
    This definitely seems very cool. Good luck with this I'm sure I'll check it out upon release.
     
  6. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    253
    Thank you. PM me with your email or drop me an email If you want to try it before release. I will send you the beta package.
     
  7. xeleh

    xeleh

    Joined:
    Jul 22, 2016
    Posts:
    302
    I have two questions: 1) Apart from the integration in the Editor and the ping to the current opened document, what are the advantages of your asset compared to using Visual Studio Code directly? 2) What is the price of the asset?
     
  8. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    253
    Thanks for your questions.

    For #1, this assets is smaller than VSCode, easy setup, and it can interactive with Unity Editor (Ping document is a sample) and focus on Unity Programming... VSCode is great but it's a code editor for all developers, not only for unity developers.

    For #2, I want to set it to $10 in beta phrase, but not sure after that..
     
  9. sledgeman

    sledgeman

    Joined:
    Jun 23, 2014
    Posts:
    389
    I just tried to install the beta. There is a thing called "omniSharp". This is something apart from Unity, and meant to be installed just for your windows version, to get uCodeEditor working ?! Is this really needed, in the final version ? Also i have to install NET 4.6. Is this also necessary ? I would like it, to have a uCodeEditor install just inside Unity and no other stuff for Windows, when possible (portable style).
     
  10. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    253
    Omnisharp is required, not only on windows, but also on macOS. It's the engine that powers C# language features.
    For the .NET 4.6 issue, I think it's introduced by a tool developed by me, I will try to make it as not required if possible.

    Thank you very much for your feedbacks.
     
  11. sledgeman

    sledgeman

    Joined:
    Jun 23, 2014
    Posts:
    389
    Okay. But omnisharp is portable, for windows ? As far as took a look, it was zipped without an installer. I like the portable way. And would be great if we don´t need to install NET 4.6
     
  12. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    253
    Yes, uCodeEditor packages already include the Omnisharp in it for both of Windows and macOS, no extra download actions required. And I will try to remove the .NET 4.6 required.
     
    Last edited: May 17, 2018
  13. Antony-Blackett

    Antony-Blackett

    Joined:
    Feb 15, 2011
    Posts:
    1,778
  14. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    253
    Have no debug support for now. May be in future if it's possible do that.
     
  15. Antony-Blackett

    Antony-Blackett

    Joined:
    Feb 15, 2011
    Posts:
    1,778
    I'm sorry. I can't imagine a workflow where I'd want to edit code and not be able to connect it to debug. I guess if you have other members of the team that are no programmers and you quickly need to fix something then maybe, but a lot of the time, even then, I need a debugger on their machine to be able to diagnose a problem first.
     
    Peter77 likes this.
  16. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    253
    Yes, Debugger is very useful in that case, but may be it's not required fo all cases. As far as I know, most of my friends don't use debugger in their daily work, espeically who works on macOS platform... But I do agree with you that Debugger is a very important component. I will try to add it if possbile in future. For now, uCodeEditor is a code editor, after adding the Debugger, we can call it as an IDE then :)
     
  17. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    i'd also use this for fast coding only, if i need debugging ill just start VS then..

    questions
    - is there some way to show matching brace lines?
    - or jump to matching brace?
    - also can i set custom shortcut keys? (say for "autoformat document" to be F12)
    - is there duplicate line shortcut key or can i add it? as in ctrl+D, would duplicate current row
     
  18. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    253
    #1. Yes, it has an action named 'Go To Bracket' can jump to the matching brace line
    #2. Yes jump to matching brace
    #3. Have no such feature in beta, but it's possible to do that. May be add it in later release.
    #4. Yes, have duplicate line shortcut.

    For correct shortcut settings for specific action, it's not easy inside Unity Editor. Because Unity Editor have many shortcuts which can cause shortcut conflict...
     
    Last edited: May 16, 2018
  19. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    253
  20. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    253
    The .NET 4.6 issue is fixed. And it will be included in next beta release 1.0.3b, which will available next week in my plan.
     
  21. sledgeman

    sledgeman

    Joined:
    Jun 23, 2014
    Posts:
    389
    Okay....very fast and very cool :cool:
     
  22. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    253
    Beta 1.0.3b is pending review now. Below is the release note:

    NEW:
    - Add Auto Save support, we can turn on/off it in Settings Window
    - Add cursor navigation history support, see the commands `Move Cursor to Previous Positon` and `Move Cursort to Next Position` in Command Palette
    - Add settings for tabSize and insertSpaces formatting options for Shaderlab in Settings Window
    - Add `Sync With Project` button in Main UI, it can save all document automatically and then trigger a recompile to make project update to date
    - Add an new color theme `Monokai`
    - Add Region support for CSharp and Shaderlab.
    - C#: using `#region` / `#endregion`
    - Shaderlab: using `//region` / `//endregion` or `//#region` / `//#endregion`
    - Add commands for help information, like online documents, tips and tricks

    Bug Fix:
    - Fix open file will be failed in some cases
    - Fix content of opened documents will be overwrote in some cases
    - Fix insert text is not correct after press enter key in xml document comments in C#
    - Remove .NET 4.6 dependency on Windows
     
  23. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    maybe related to autosave,
    so if unity suddenly crashes (during entering playmode or maybe during some bad import),
    will the currently unsaved code be saved?

    and is there some risk of losing some code if it crashes while its actually saving the script data?
    (although probably quite small change of happening exactly at the same time)
     
  24. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    253
    uCodeEditor will save the unsaved scripts before entering playmode automatically and saving logic have no changes to cause unity editor crashes. If autosave turn on, uCodeEditor will save data after script changes, this happen before importing assets. If autosave turn off, bad import may cause script changes lost.

    If there are something external make Unity Editor crash while the saving process is running, that will case data lost, because the saving is not completed... But that will be very very very little chance for that happen, because saving process will be completed in very short time, which is less a second normally.
     
  25. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    253
    Hi, Beta 1.0.3b is available on Asset Store now. And in my plan, text search in all files feature will be the main update for next beta version. Thanks.
     
  26. IndleStudios

    IndleStudios

    Joined:
    Oct 12, 2017
    Posts:
    9
    put the theme of youtuber brackeys ...
     
  27. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    253
    Hello, I'm sorry that I'm not fully understand your request. You want to ask me to add a new theme in uCodeEditor, right?
     
  28. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    253
    Beta 1.0.4b was submitted to Asset Store. Below is the release note of that version:

    New:
    - Add search text in files feature. Open the search view via `Search...` command in Command Palette or via Ctrl+` shortcut
    - Add ability that user can add new color theme using json file, see the monokai example in package
    - Add `Toggle Word Wrap` command
    - Add open project path in Command Line/ Terminal command, see `Project: Open In Command Line` on Windows or `Project: Open In Terminal` macOS in Command Palette

    Improvements:
    - Improve the `Auto Save` trigger time.
    - Improve background color when there are no openned items in uCodeEditor

    Bug Fix:
    - Fix shortcut doesn't work on Windows for some commands
    - Fix some snippets are broken issue
    - Fix `Reload uCodeEditor` Command lost in Command Palette issue
     
  29. sato_se

    sato_se

    Joined:
    Dec 13, 2015
    Posts:
    2
    Current version Asset store version is still 1.0.3b When will it be updated to 1.0.4b? Also, although I'd like it, I would like a split screen function
     
  30. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    253
    Not sure why the review form Asset Store team so slow this time, I already submitted the 1.0.4b five days ago.

    About split screen function, I added an ToDo item for it. Will start it after shortcut customization feather is done.
     
    sato_se likes this.
  31. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    253
    Beta version 1.0.4b is available on Asset Store now.
     
  32. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    253
    Beta version 1.0.5b was submitted to Asset Store. And It's the last beta release.

    New:

    - Add shortcut customization feature. Use `Shortcuts: Customization...` action in Command Palette to open the customization window.
    - Add an action `Shortcuts: Restore To Default` action in Command Palette to restore shortcuts to default for all actions
    - Add ability that uCodeEditor can remember last active tab

    Bug Fix:
    - Fix text editor window size does not resize issue.
    - Fix bug that no tab will be created when local settings is empty.
     
  33. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    253
    Version 1.0.5b is available on Asset Store now.
     
  34. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    @Amlovey any plan to support 2017-18 plus? i cannot open an existing scripts under unity 18.1
     
  35. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    253
    I'm develop uCodeEditor in 2017, it shoud be support. May I ask you the version number of your Unity 2018 Editor?

    And may I ask you try restart Unity to see If it works after restart or not. Thank you very much!
     
  36. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    2018.1.0f2 and yes i did restart the editor
     
  37. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    253
    Thank you, I will setup a environment and try to repro it. I will back to you after that.
     
  38. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Hmm testing it in empty project on 2017.2.1p2 and 2018.1.0f2 same result, can't open scripts/shader. Always ended up untitled file
     
  39. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    253
    @Reanimate_L I digged into code and found there is a bug on windows platform. below is the fix:

    in file uCodeEditor/Editor/CoreWebviewComService

    change line 100:

    from
    Code (CSharp):
    1. if (!File.Exists(temp[0]))
    to
    Code (CSharp):
    1. #if UNITY_EDITOR_WIN
    2. if (!File.Exists(temp[1]))
    3. #else
    4. if (!File.Exists(temp[0]))
    5. #endif
    will fix the bug.
     
    Reanimate_L likes this.
  40. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    yep that fixed it, awesome
     
  41. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    253
    Glad to hear it works on your side. :) I also submitted a new packages with the fix to Asset Store.
     
    Reanimate_L likes this.
  42. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    @Amlovey oh a request if you don't mind. hlsl support, since SRP are using hlsl now
     
  43. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    253
    That's a big topic i think. Email may be better than forum post to discuss it. Would you mind drop me email with more details? my email is amlovey@qq.com.
     
  44. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Oh nevermind, it's from my side. uCodeEditor did support opening hlsl. I just forgot to apply the fix for windows on another project. It's all good now.
     
  45. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    253
    New packages with fix of open scripts issue was declined by Asset Store team... I have made some changes by following Asset Store team guideline and resubmitted it with bumping up to the version number 1.0.6. It's the first non-beta release and price was changed.

    Below is the release note of the new version 1.0.6:

    NEW:
    - Add TabOut feature which can move cursors out of parenthesizes and string like in Visual Studio. We can enable it in settings window.
    - New About Window.
    - New theme `Monokai-One`.

    Improvements:
    - `Open in uCodeEditor` will be grey and unclickable when select unsupported asset.
    - Default setting of `Auto Save` is On now.
    - uCodeEditor folder in project can be moved to other folders now.

    Bug Fix:
    - Fix window has little chance to become to no response after reimporting.
    - Fix open scripts failed on Windows platform in some scenarios.
    - Fix go to file feature got an empty list in some scenarios.
    - Fix color theme dropdown list scroll bug in Settings Window.
     
  46. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    253
    Version 1.0.6 is available on Asset Store now.;)
     
  47. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    253
    Version 1.0.7 was submitted to Asset Store.

    NEW:

    - Add `Export Settings..` and `Import Settings...` action in Command Palette to save or load editor settings to a single file.

    Bug Fix:
    - Fix bug that window become no response after scene file reloaded.
    - Fix xml document comment format for property of CSharp.
     
  48. rawna

    rawna

    Joined:
    Aug 13, 2015
    Posts:
    35
    Just found out about this, and it looks awesome.

    One question / request

    Can it edit csx files (and run them)

    The workflow I have in mind is to create small scripts to process some assets, or to modify some objects in the hierarchy, and I don't want to create an editor class and menu item every time.

    So i'd use this kind of like a REPL
     
  49. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    253
    Hi @rawna,

    uCodeEditor does not support edit csx files and run them for now, but it's possible do that because Omnisharp does support csx file. CSX support is a big topic i think, would you mind send me email to me? let's discuss it using email.

    Thanks,
    Amlovey
     
    Last edited: Jul 19, 2018
  50. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    253
    Version 1.0.8 is submitted to Asset Store.

    NEW:
    - Add `Unity Editor: Go To Scene...` action to quick open scene in Unity Editor.
    - Add `Unity Editor: Reveal Special Folder...` action to reveal Unity special folder, like Application.dataPath, Application.persistentDataPath, Asset Store Packages Folder etc.
    - Add Unity 2018.2 support. We can open file in packages folder as readonly file in uCodeEditor and highlighting for .uxml, .uss, .xsd files.
    - Add .csx editing support.
    - Add file icons.

    Improvement
    - Record cursor line to instead of cursor position for cursor navigation history.
    - Improve C# Highlighting with async/await keywords support.

    Bug Fix:
    - Open file with line failed in some scenarios.
    - View state of previous opened file will missing after new file is loaded from Unity Editor side.
    - Description of quick open file entry is not correct when assets are under root of assets folder.
     
  51. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    253
    40% OFF SALE for 2 weeks started now.

    BTW, the next new version 1.0.9 will have ability to preview markdown files in editor. it will available next week in plan.