Search Unity

UnityScript Editor 2.0.8

Discussion in 'Formats & External Tools' started by SolusHunter, May 3, 2010.

  1. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    @SolusHunter - After trying all the other Javascript editor options for Unity under Windows (MonoDevelop, UniScite, and Notepad++) and now yours, I have to say that without question yours is the best. The autocompletion is top notch and the layout of the editor is great. Some feedback on some issues:

    - The installer expects the Unity application to be installed in /Applicatons(x86)/Unity and when I tried to redirect it to my custom application directory it installed it in a new folder there. Then got a Windows error that the application was missing a necessary component so I'm guessing this is a result of the application being in the wrong folder?

    - The editor works -great- with Javascript, but C# scripts aren't fully supported. Unfortunately nearly every application I've ever created has at least one C# script in it so it would be nice if the editor at least included auto highlighting of functions, etc. for C#.

    - Custom shaders aren't supported at all and if double clicked in the Unity editor they won't even open. It would be better if your editor had at least some limited support for shaders (such as I suggested for C# above).

    In it's current state the UnityScript editor is the best Javascript editor there is for Unity under Windows. Unfortunately, because of the second two issues above it cannot be used as your only script editor and consequently is of limited use (to me at least).
     
    Last edited: Nov 21, 2010
  2. SolusHunter

    SolusHunter

    Joined:
    Apr 13, 2010
    Posts:
    219
    Do custom shaders usually open in the default Unity editor? I haven't used them in Unity yet so I don't know.

    I will consider adding C# syntax highlighting but as I don't use or know C# it will be complicated. I can't promise anything.
     
  3. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Yes, Unity uses the default editor to open all scripts: JS, Boo, C#, shaders and even txt files. I think what you've done is a very good start, but I also understand this is a personal project and lacks funding. Too bad Unity Tech hasn't invested the man hours into something like this themselves.
     
  4. SolusHunter

    SolusHunter

    Joined:
    Apr 13, 2010
    Posts:
    219
    What are the file extensions used for shaders and Boo files? I can add them in so that they load as plain text (no highlighting).
     
  5. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
  6. SolusHunter

    SolusHunter

    Joined:
    Apr 13, 2010
    Posts:
    219
    @bigkahuna - The installer allows you to change the installation path. By default it does offer to install in the default location of Unity3D, this was done to avoid problems by users that generally install everything in Program Files. When installing just browse for the UniSciTe folder where you have Unity3D installed.

    All - Version 2.5.1 has been uploaded, this version just allows .shader and .py files to be opened in the editor (no highlighting supported).
     
  7. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Thanks. Your website still says it's version 2.5.0, but it's really 2.5.1, right?

    Edit - Yup, it's 2.5.1. The website just needs to be updated. ;)

    Edit 2 - Huh. The installation failed here. My Unity 3 folder is labeled Unity3.1.0 instead of just Unity and when the installation completes your app doesn't appear at all. I wonder if it's got to do with permissions or something. I'm using Windows 7 Home Premium and am running an account with admin privileges.

    Edit 3 - Ok, tried installing to a different folder than the UniScite folder. I put it in a new "USE" folder in the same tools subfolder as UniScite. Personally, I think this is better than renaming/replacing UniScite. Installation went OK this time but when I launch USE I get a Program Compatibility Error that "flash.ocx" is required but no longer available. Windows said to update my Flash player, which I did but the error still pops up.

    Last edit, I promise - Still doesn't open .shader files or .txt files which are both commonly used in a Unity project. If I click on them the editor opens, but the files aren't loaded.
     
    Last edited: Nov 28, 2010
  8. SolusHunter

    SolusHunter

    Joined:
    Apr 13, 2010
    Posts:
    219
    @bigkahuna - The reason the install has to overwrite the UniSciTe (or rather rename it) is otherwise it's not possible to double click error messages in Unity to open the editor on the correct file.

    The website does need updating. It skipped my mind :)

    The .shader and .py (not .txt) support should be working. I'll check.
     
  9. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Gotcha. Unfortunately the installer isn't working properly then. It appears to complete the installation but UniScite is not replaced. Which version of Windows are you using to test this? I know Windows 7 has some funky issues with permissions and I'm guessing this is what's causing the issue. Does the application have to be in a folder named UniScite? Or can the application be in a different folder and just the application be named UniScite?
     
  10. SolusHunter

    SolusHunter

    Joined:
    Apr 13, 2010
    Posts:
    219
    I use Windows 7 Premium x64.

    UnityScript Editor will attempt to rename UniSciTe.exe IF you install into the Tools/UniSciTe/ folder, if you don't install the program in that folder it won't be able to rename the file because it won't be able to find it. In this instance you will loose features and you have to change the default editor in Unity to USE instead.

    I'm looking into the shader and py and txt file issue now.
     
  11. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    I understand how the installer is supposed to work. What I'm saying is that it's not working that way. Take a look:

    $Capture.JPG
    Here's the UniScite folder before installing USE.

    $Capture2.JPG
    Here's the path typed into your installer.

    $Capture3.JPG
    Here's the end result. The USE exe file isn't installed. UniScite is still there.
     
  12. SolusHunter

    SolusHunter

    Joined:
    Apr 13, 2010
    Posts:
    219
    Obviously the installer wasn't allowed to rename the file then. Did you have Unity open, or UniSciTe open at the time. It's possible that if this occurred once the installer felt that it shouldn't try again.

    Try uninstalling USE, then rename UniSciTe.exe yourself to something else, then reinstall USE.

    See if that helps.
     
  13. SolusHunter

    SolusHunter

    Joined:
    Apr 13, 2010
    Posts:
    219
    Re the flash.ocx component error warning. I'm not sure why that displays, the application doesn't even use flash. It is safe to ignore it. Looking online it might be something to do with Visual Studio 2008. I will see about upgrading to VS2010 soon and hopefully this issue will be resolved.
     
  14. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Nope. No open applications during installation. There must be something going on with the permissions. I ran into this with installers and Windows 7 before with projects I was distributing.

    Yup. That forces it to work. But I still get the warning about "flash.ocx" being missing when I close USE. I also found that if I open a .js file once by double clicking it in the Unity editor, leave USE open, then double click the .js file a second time in the Unity editor, USE will open a new, empty .js file. I use double clicking a script all the time, even if it's already open, to bring the script editor to the foreground to be edited.
     
  15. SolusHunter

    SolusHunter

    Joined:
    Apr 13, 2010
    Posts:
    219
    USE should jump back to the same open file. I'll check it out.
     
  16. SolusHunter

    SolusHunter

    Joined:
    Apr 13, 2010
    Posts:
    219
    A new update is now available for download.

    Version 2.5.2:
    Corrects the handling of .py, .txt, .shader, .cs files
    Fixed open document window (missing file extensions)
    Corrected interaction between Unity when double clicking a file more than once.

    http://www.arsoftware.co.uk/products/unityscript-editor
     
  17. SolusHunter

    SolusHunter

    Joined:
    Apr 13, 2010
    Posts:
    219
    If you get the flash.ocx component missing warning, which seems to be the case for those using Vista and Windows 7 use the link below to download and install the activex version of the latest flash player:

    http://www.arsoftware.co.uk/files/USE/flash10ocx.exe

    This should hopefully sort out the problem until I can locate a better solution.

    EDIT: I've also now included the flash.ocx in the installer so hopefully this will correct the issue.
     
    Last edited: Nov 28, 2010
  18. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Good news! I can confirm the reported fixes all work. I also didn't get the flash.ocx warning so that must be fixed as well. I did, however, have to rename UniScite.exe prior to installing in order for it to install properly. I even tried running the installer as the administrator but it still behaved the same as before. I have made USE my default script editor and will give it a thorough workout over the next few days. Unfortunately, I'm not using 3.1 all that much because of other, unrelated issues, but will still try to use it as much as I can.

    Definitely the -best- javascript editor for Unity 3.x, hands down. Nicely done! :)
     
  19. SolusHunter

    SolusHunter

    Joined:
    Apr 13, 2010
    Posts:
    219
    Great to hear.

    I haven't had a chance to do much more than install Unity 3 so far. I'm planning on starting a project int he new year.
     
  20. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Just gave it a bit of a spin. I see that if there's a script error that clicking on it in the Unity editor doesn't take you to the suspect line of code, but you've got a script error window in the USE editor where the link does work. Different than I'm used to but kind of cool. I also like that you've got another tab that opens the Unity script reference in a built in browser page, that's totally cool. I really like what you've done. This is what Unity's default script editor should look like.
     
  21. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    I found a couple minor issues:

    - Clicking on the top menu Help > Check For New Version opens a browser to your "Autowallpaper" product downloads rather than the UnityScript editor page.
    - When an Error Log message appears, a red bar appears to the left side of the line of -all- open scripts in the editor. So, for example, if script A has an error on line 24, the red bar appears at line 24 of all scripts that are open in the editor.

    I also just noticed the Project Files and File Explorer tabs on the left hand side of the window. Very nice!
     
  22. StephenL

    StephenL

    Joined:
    Oct 18, 2010
    Posts:
    218
    Nice update! I love this editor. :D
     
  23. piotrO

    piotrO

    Joined:
    Dec 16, 2009
    Posts:
    46
    Great editor!

    However I found some tiny issues:
    1) when I type 'for(' i get 'forceMode('
    2) command capitalization seems to not be working and it would be huge time saver if it did
    3) it would be great to have text 'drag and drop' mode, where you can select a block of code and drag it somewhere in your script
    4) and maybe it's a matter of personal taste but I'd love to have numeric values and text string highlighted in a color other than white (pink or violet would be nice for the Grey Scheme).

    Besides of that it's nearly perfect and the Grey Scheme just rocks!
     
  24. itech

    itech

    Joined:
    Jul 28, 2010
    Posts:
    139
    It's look's OK.
     
  25. SolusHunter

    SolusHunter

    Joined:
    Apr 13, 2010
    Posts:
    219
    Sorry for the delay of a response, the forum doesn't seem to email me for each new entry.

    Anyway...

    I've made a note of the little glitches and I will take a look through them soon and see what I can do.

    @piotrO: Command captialization is a bit of a difficult issue. Unity has a lot of commands that share names with properties and methods, gameObject and GameObject. This makes life rather difficult when trying to detect the context the keyword is being typed. This is why I decided to switch it off by default. Have you enabled the capitalization option?
     
  26. piotrO

    piotrO

    Joined:
    Dec 16, 2009
    Posts:
    46
    @SolusHunter: Yes I enabled the capitalization option.
     
  27. SolusHunter

    SolusHunter

    Joined:
    Apr 13, 2010
    Posts:
    219
    I should have an update out this weekend.

    I've corrected the drag and drop text in the editor, this was caused by the addition of the file drag and drop feature.
    The Grey and Dark schemes now have coloring for strings (green) and numbers (orange)

    I'm still looking into the reported issue that shows the error mark on all editors; I haven't been able to replicate it so far.
     
  28. SolusHunter

    SolusHunter

    Joined:
    Apr 13, 2010
    Posts:
    219
    A new update is now available for download - v2.5.3.

    This update includes the following changes:
    • Drag and drop code support restored
    • Colour schemes updated to colour strongs and numbers better
    • Some options had become disconnected from their settings, these have been fixed
    • Fixed support links going to wrong product on website

    Please note that on first run after installing this update you may get an error message. Just click Quit/Exit and restart UnityScript Editor. This is because the settings file from the previous version was missing a few options and the new version will need to re-save the settings.

    http://www.arsoftware.co.uk/products/unityscript-editor

    Additional Notes:
    I was unable to replicate the issue reported where an error on one script is shown in all script windows - I'm still investigating.
     
  29. Al-Anselmo

    Al-Anselmo

    Joined:
    Apr 6, 2010
    Posts:
    86
    I was looking for an alternative, and this one is looking to fit!

    I read the thread quickly (and am sleepy atm) but I have some questions:
    - How better is it against the MonoDevelop (which comes with U3)?
    - How better is it against the default UniSciTe?
    - Are there any bugs that would make me think again before using this editor?

    Sorry if those questions were already answered. I remember a reply from bigkahuna which says this editor is the best, but I want to doublecheck ;)

    Thanks
     
  30. Vectrex

    Vectrex

    Joined:
    Oct 31, 2009
    Posts:
    267
    Nice, I need a decent JS editor when I HAVE to tolerate JS ;) Really needs intellisense on custom code though.

    Not to disrespect anyone or derail the thread (I'll start another one) but if you can afford it you'd be insane not to use this combo. Visual Studio Pro + ReSharper + C#. Any extra work with C# over JS is utterly out the door.
    Here's a vid of someone showing off a tiny fraction of the features resharper has. I barely type anything anymore.
    http://www.youtube.com/watch?v=8bjPrQYCzY8
     
    Last edited: Dec 6, 2010
  31. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Everyone will have their own opinion, but here's mine:

    It's clear that Unity Tech assumes that most people are using C# as both the editors they provide with Unity 3.x are really incomplete, buggy, and pretty much unusable for Javascript coding.
    The formating in UniScite is horrible. You can edit UniScite's configuration manually so that your code is at least legible, but it's otherwise a very limited text editor.

    MonoDevelop's really isn't intended for Javascript.

    Notepad++ was the first alternative I tried and some fellow users have posted configuration files and instructions on how to customize it for use with Unity and Javascript. Notepad++ is many times better than UniScite for Javascript code editing.

    SolusHunter's UnityScript Editor is the only real Unity Javascript editor available at the moment. It includes auto-completion, direct links to code error messages and a bevy of other cool features. Nothing else comes close IMO for Javascript editing for Unity 3.x.
     
  32. piotrO

    piotrO

    Joined:
    Dec 16, 2009
    Posts:
    46
    @bigkahuna: I second that.

    The other editors are also nice (I'm using FlashDevelop for AS3 coding, and Notepad++ as a general text editor),but UnityScript just feels right. And you will use every feature that comes with UnityScript, unlike tons of useless menus and windows (from JS code point of view) you get with Notepad++ and UnityDevelop. UnityDevelop is decent, but its development has cased and it's intellisense isn't perfect.

    The frequency of SolusHunter updates are also remarkable.

    BTW. In 2.5.3 Grey Scheme numeric values have perfect color but strings aren't visible.
     
  33. Deleted User

    Deleted User

    Guest

    I have difficulties to configure UnityScript Editor with Fusion or Parallels.

    Someone could confirm that it works with fusion or Parallels?
     
    Last edited by a moderator: Dec 6, 2010
  34. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    @Andrea - Yeah, I think you're going to have problems running it in a virtual machine as it is designed to be installed and run from the Unity application folder (in Windows). You'd probably have to install Unity in a Windows VM also, but that wouldn't make sense nor work well at all.
     
  35. Al-Anselmo

    Al-Anselmo

    Joined:
    Apr 6, 2010
    Posts:
    86
    Thank you for the reply, I will use it right now! ;]

    Edit: As piotrO mentioned, the grey theme is really great, but the string values are not visible because its color is the same as the background's. I think the grey theme is the best.

    Edit 2: Another thing I noticed is the lack of feedback if the script I'm working on was already saved, or not. What I'm talking about is that "*" that stays besides the name of the script on the script editor window, telling us that script needs to be saved.

    Edit 3: One thing is disturbing me is when you have a written line, set the cursor at the beginning of the line and press Enter, the line will go down but: the cursor is now at the end of the line, which doesn't help me when I want to use multiple enters for a more separated script. Do you think you could fix it, please?

    I just want to say that this editor is really nice, and I like using it.
     
    Last edited: Dec 7, 2010
  36. SolusHunter

    SolusHunter

    Joined:
    Apr 13, 2010
    Posts:
    219
    The grey theme can be edited by hand if you want to adjust the colorings yourself.

    In the Unity/Tools/UniSciTe/syntax folder you will find 6 theme files (xml), two for each color scheme. If you open one of those you should be able to see the colors being set up at the top of the xml file, just replace the color with a new hex html color entry, save and reload UnityScript Editor.

    I will double check the color scheme for the next update, but I thought you might like a quick workaround for the time being.

    Thanks for all the kind words above as well :)

    @Al Anselmo:
    Edit 2 - What sort of feedback were you after?
    Edit 3 - I'll check it out, I think it is related to the automatic indentation process, and during the course of that the caret/cursor is moved to the end of the line.
     
  37. Al-Anselmo

    Al-Anselmo

    Joined:
    Apr 6, 2010
    Posts:
    86
    Sorry for the "Edit 2" part. The feedback I mentioned is already implemented.
    But, sometimes when I open a script and edit it, the * doesn't show (before I save). This bug is happening sometimes, but not always. Can someone confirm if this is usual?
    Yea, I think that enter issue has to do with the identation process too.

    I found the bug with the string color: it was missing a hashtag (#) before the hex html on the "UnityScript-Grey Scheme" file, under the "StringDefaultStyle" area. Just type the hashtag before the code and it fixes :)
    I'm using the #c79ccd
     
    Last edited: Dec 8, 2010
  38. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Anyone attempt to replicate the Unity Pro color scheme for this yet?
     
  39. Al-Anselmo

    Al-Anselmo

    Joined:
    Apr 6, 2010
    Posts:
    86
    That would be fun to have.
     
  40. SolusHunter

    SolusHunter

    Joined:
    Apr 13, 2010
    Posts:
    219
    Strange I could have sworn I added the # to the colour codes. Oh well. I'll get it fixed for the next official update.

    If anyone does manage to do the Unity Pro colour scheme (or any other scheme) please feel free to email it to me and I'll include it in the setup.
     
  41. Al-Anselmo

    Al-Anselmo

    Joined:
    Apr 6, 2010
    Posts:
    86
    I modified some colors already, but I have no idea how to change the background color. Any idea?
     
  42. melmonkey

    melmonkey

    Joined:
    Mar 31, 2009
    Posts:
    373
    I am wondering what it will take to get this ported to OSX? If I can help in any way, I will, although I am not an OSX programmer, but I can pretend to be one if it will help.
     
  43. SolusHunter

    SolusHunter

    Joined:
    Apr 13, 2010
    Posts:
    219
    The background color is controled internally and cannot be adjusted by the theme files - sorry. What background colour are you after?

    @melmonkey - Sadly to port it to Mac OSX would require a full .NET3.5/4 as well as full support for .NET components.
     
  44. melmonkey

    melmonkey

    Joined:
    Mar 31, 2009
    Posts:
    373
    I guess that makes it too difficult? Ah well...

    I will give it a shot today with some PC work I need to do.
     
  45. zideen

    zideen

    Joined:
    Sep 10, 2010
    Posts:
    6
  46. Al-Anselmo

    Al-Anselmo

    Joined:
    Apr 6, 2010
    Posts:
    86
    The main background of the new black UI of Unity Pro.
    #383838

    I will paste here some values I found:
    - "white" text: #b4b4b4
    - yellow/ gold used for warning messages: #f4bc02
    - red, used for error messages: #a91b1b
    - blue used for prefabs on hierarchy: #446093
     
  47. SolusHunter

    SolusHunter

    Joined:
    Apr 13, 2010
    Posts:
    219
    UnityScript Editor 2.5.4 now available for download.

    This update includes:
    New metroline style scheme (I've tried to use the colours as best I could from the screen shots given)
    Adjusted Dark scheme to include some colouring from the Unity Pro scheme
    Corrected Grey scheme to fix text strings using background colour
    Added an option to disable USEs handling of the error log that in some rare situations might cause a lock up when going from Unity to USE and back again.

    http://www.arsoftware.co.uk/products/unityscript-editor

    Please note: If you've modified the scheme files you should make a backup of those files before installing this update as it will replace the files. In a later update I will change the way the files are handled to allow users to create their own schemes and keep them between updates.
     
  48. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Nice. :) I like the new Unity Pro color scheme. Any plans to alter the rest of the UI to match Unity Pro's colors?
     
  49. SolusHunter

    SolusHunter

    Joined:
    Apr 13, 2010
    Posts:
    219
    Sadly, application skinning is a little outside of my skill base I'm afraid. In the past I've found that the skinning components are extremely expensive.
     
  50. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    No problem, it's still an awesome tool! :)