A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Introducing the new Universal Render Pipeline and High Definition Render Pipeline subforums!
Unity 2019.3 Beta is out now.
Discussion in 'Works In Progress' started by Flipbookee, Aug 10, 2013.
This is awesome! I'm super excited!
Oh my goshhh...! Releaseeee it pleassse
And please make sure the completion tooltips work with the darker themes like oblivion and monokai.
Hehe, thanks! Same here, after so much time spent on it I can finally see it giving nice results
Hmm, I still don't have dark skins for the popup windows. There are a couple of things I'll have to decide about, like whether to match the background color of the code window or to make it slightly different, or is it better to show tooltips with syntax colored text or just as plain text as it is now, use monospaced font or not, scale the font to match the size of the font in the code view, etc... Does anyone want to share personal preferences or opinions?
I'd first start off by matching the Font, BG and Highlight colour from the theme... and only change it if it didn't work.
I think it will look better and more usable to have the background color of the pop-window to be just slightly lighter in color (a shade lighter) than the background color of the code window under the Oblivion and Monokai theme. Because when the window pops up it becomes the foreground and making it more stand out, and it also gives it a better 3D effect.
How about a new colour in the theme definition? popWindowColor = new Color()? Then we just need to set that in the theme? Maybe with some sort of if (popWindowColor == null) then popWindowColor == backgroundColor?
I'm super super super excited about this, too ... about
There will be a lot, here are several more (also more difficult, I think) :
1. Code folding with shortcuts to fold to definition, fold all ....
2. Go to definition (maybe F12 ?)
3. Show hint when mouse over a function or after press (
4. Colum edit (normally hold Alt down ?)
5. Code snippets (for loop, while loop, ...)
6. Code generator (create method stub, create local / member field / properties )
7. Refactor : rename method, properties, fields, classname ...
8. Outline mode in inspector windows instead of full source code
9. Autosave the script (somewhere else than the original file so Unity won't reload scripts) when quit unity (or lose focus ? )
10. Exclude a script from unity (maybe change extension ?) and Include it back (useful when we are in the middle of develop something but want to have a build or check something already work)
BTW do you have a public changelist / public bug report / roadmap so I can have a look, really need to know what is planned, what's on the way ....
thanks a lot man, you are saving the world !
The "trick" for this is to create a folder called "WebplayerTemplates" and put any code/scripts you don't want included/compiled into it. I have written about this here.
I know this, too, and it's official information, not a trick. But it's not very practical, assume that you can ignore several scripts, and turn back on later quite quick, you don't want to mess up the folder structure by moving things around. I still think rename the extension should work the best, it's still there, we can still see and edit (with code completion ? ), just being ignore by Unity.
Thanks for the great suggestions guys! Definitely it has to be configurable from the theme, and the default to match the line highlighting color might work. A great use-case for the exotic null-coalescing operator of C#, so that would something like popWindowColor ?? currentLineColor...
Here's what I got with the Tango Dark theme by reusing its background color and its current line highlighting color, so you can see yourself how that looks like (using the same old selection highlight in the autocomplete popup.. and the same old icons which don't work on non-white background ):
This was planned since the beginning but it was waiting for the full proper parser to be implemented first. I have that now, but it has to wait again one additional version update.
He, he, that was done a little bit before autocompletion, you probably didn't notice it
I'm still "fighting" with handling of method overloads for this... soon...
Ah, I love that! But it always gets pushed back by the higher priority tasks
Yep, sure... Later on...
He, he, easy man once everything works as it should I can think of these kind of things too
That's a relatively easy one, as it's a combination of go to definition and find all references which I'm already doing in the WIP version. See the highlighted word under cursor? Those are actually highlighted symbol references, not just simple text matches
That's a nice one never thought of that as an option!
That would be also cool...
Note that on quit Si2 will always ask you do you want to save unsaved changes, if any! Also note that Unity itself won't do such thing with its own built-in inspectors that require pressing the Apply button, and also many of the third party editor extension will also close without saving or asking to save unsaved changes! This is I guess due to the missing notification in Unity's API, so handling this event is tricky...
Hmm, not really... I was kind of stuck for the last 8 months with autocompletion, which was the only important thing on the roadmap, everything else was just pushed back for a future version.
I'm just having fun, that's all
Thanks Adam for the tip, I didn't know about this, and that's quite important for the semantic analysis part!
I see what you mean... I'll try to think of some practical solution...
So, how's it going, man, it's been a week. I know, new year's here but I'm so excited, can't help . Btw, Happy New Year, everyone !
I want......uuhhhhhhh. Can't wait for it. Whats the price? Sorry if that was already answered.
Happy New Year!!!
I was hoping the holidays will allow me to spend more time on this, but it was just opposite to that. I started working on method overloads a few days ago, so that should be ready in about two days. Another thing which might be a little bit tricky after that is handling the generics... I'll see if that may be skipped eventually and start the beta without it, but I doubt, I need that to handle generic containers at least.
Well Script Inspector 2 is already available on Asset Store and allows code editing but without the automatic code completion part since that's not finished yet. Price is $25, and I was planning to change that to $35 after finishing, but it turned out it's way too much work for such a small price increase, so I may reconsider that, I'm not sure yet.
Happy New Year!
I like this suggestion a lot!
Resolving overloaded methods in C# is more tricky than you would expect! Here's a nice summary of the resolution process with details explaining how complex cases are handled:
It's a nice and easy to follow article, worth reading, trust me, as it contains cases with unexpected behaviours and I bet there will be a surprise for every one of you.
So far my WIP version of Si2 learned how to handle the not-so-complex cases
But I'll have to continue working on this a little bit more until I make sure all the rules are working exactly the same as in the compiler. This may look not so important, but it is actually very important, because the returned types of overloaded methods may be totally different and when it's used in something like "var myLocalVar = SomeOverloadedMethod(42);" defines the type of the variable myLocalVar, which is then used to list completions after typing a dot after myLocalVar, for example...
I'm looking forward on any update on any detail of this product, man. Please keep me update, I have a lot of features request for you, too. But let's wait for this auto-complete thing first.
I know it would be very difficult to handle auto-complete and that's why I am so excited about any update about the progress or even problem you've been got stuck with.
Actually I'm planning on developing some extensions / plugins based on the auto-complete feature of SI2, so, can't wait to see it in action.
I'm available to discussion on skype (you got mine) or if you could provide me some other better way to talk to you, that would be absolutely great !!!
Thanks man, you are changing the world.
p/s No, I don't like fan-boy, AND I AM NOT, but this is absolutely COOL !!!
I have decided to not go with any new updates before I finish preparing for beta. The beta will start as it is now, without any new features, otherwise this may go on forever. I think it will be better for all of us if we start using this now and get the other improvements gradually over time.
As it stands now there are no problems, only monkey job needed to get it all wrapped nicely.
I was planning to expose some API so you can develop plugins for Si2 or use Si2 views embedded inside your own extensions, but that plan is still on hold for now.
Looking forward to see you on the beta boat!
ok, some more feature requests, pin here as a note so you can check back later ...
1. Set break-points and goto break-points while debugging
2. Show values of all variables when mouse is over in current scope while stopping at break-points
3. Goto anything (check Sublime's implementation at http://www.sublimetext.com/)
4. Mutliple edit (sublime, too)
5. Support Shader auto complete (I personally think this is more important than support JS or BOO)
6. Support 3rd plugins (maybe as easy as putting a C# script inside ScriptInspector2/si2plugins/)
7. Support templates (Editorscript / MonoBehaviour / ...)
8. Show current user-set value for public variables as in Inspector (if it's different from default value)
9. Refactor options remove unused imports, rename variables ...
10. Build DLL from selected scripts
11. Project panel with favorited pin scripts
12. JSON / XML / Markdown syntax support (for document / data things)
13. Live coding (you know what it means)
14. Console panel (like in SublimeText)
15. Virtual whitespace (like Notepad++ or Visual Studio)
16. Show / Hide whitespace characters
17. Macro record / replay (check Notepad++, I really like this feature)
18. Status bar for finished operations (auto-saved, converted EOL, warnings, statistics for current file ...)
19. Bookmarks panel, Todo panel
20. Auto quote / braces completion
21. Outline panel (like in Visual Studio's CodeMap)
22. Hide / Show all comments
23. Snapshot selected code as PNG image (useful for support people that are not dev)
24. Function versioning support (maybe difficult, need integration with git / svn / hg )
25. Highlight different level code blocks as we sometimes have very long classes / functions (I know long is bad practices, but we can do nothing for other people's code)
26. Auto code formater
27. Prebuild - Postbuild hooks
28. Edit global build config variables (#define)
Maybe some more, but that's it for now... Not sure how the sales doing these days but I really hope you will never give up on this project, it's so cool !!! If anything on the list above you don't think you will do it anytime soon, I will gladly implement a 3rd extension for that and put in the assetstore, so feel free to pick !
p/s : I found this today, not sure if it will help you someway https://github.com/Unity-Technologies/CodeEditor
Wow! Nice list!
You mean MD break-points? I was considering that a long time ago but I didn't find any way how to do that. I guess the only way would be by adding a plugin to MD...
Not possible he, he... Once you hit the break-point set from MD the execution of Unity with all of its scripts stops, so Si2 will stop too ... Well, unless you're debugging another process like a standalone build, then it might be possible to communicate with MD through that plugin, and maybe even control its step-debugger and do step-into, step-out, step-over, or continue.
Yep, I've already planed that. Might be the first thing after auto-complete.
I love that and it's already on my list.
I absolutely agree
That was quite high on my list but I pushed it back in favor of auto-completion. If you have something on your mind we can work together step by step and I'll be adding API to support that based on your needs?
There's a free extension from UT called Create Script Dialog, I think.
Non-static fields are tied to instances, but for static fields this is easily doable. Non-statics might work too if I use the selected gameobject for example, which would be then limited to MonoBehaviour's only. Still, it will be incredibly useful!
There are extensions that do that already.
That would be cool, but it doesn't have to tied to Si2 at all! It could be a different extension that does that and opens the scripts either in the external editor or in Si2.
+ yaml and xaml
He, he ... I don't have any plans to do that, unless Rodrigo is willing to allow integrating third party extensions with Livity.
Impressive list! Some of these are planned, some not yet... I'm not sure what you mean by build hooks?
I was planning to allow toggling of "defines" only for code editing purposes, so you'll get different parts of code nested inside #if blocks enabled or disabled, but not to reflect that to the actual settings of the project.
Sales are poor as usual but I don't mind that too much and I certainly don't plan to give up because of that! It's too cool to work on this project!!!
If you feel brave enough go for controlling the breakpoints. If you think that would be too much pick something easier, like the macro recorder for example and I'll make sure to provide you with all the support you may need. Or maybe the Project Scripts window, that's quite simple and sounds useful?
That's what the code editor in Livity is based on and it's pretty basic. The code editor of Si2 is waaaay more advanced than that!
I don't agree. (no offense intended) Not only for my personal interest (I'm more comfortable with JS) but because:
-Shader support is a relatively new feature and (I think) the main buyers of SI have taken this nice tool to normal Unity scripting languages. They (as me) are waiting auto comlete feature from the very early versions.
- after C# auto complete... the street to a JS porting should not be too hard to realize.
Hmm, both arguments are true...
My reasoning was that the grammar for ShaderLab is very simple and there's almost no need to syntax analysis, so adding this wouldn't take much time. Supporting embedded CG languages would be more complex though, but grammars in LL(k) form already exist so conversion to Si2 format would be just straight forward, but then the syntax analysis is not similar to .Net languages.
As for JS porting, the good thing is that LL(k) grammar for it also exists and also most of the syntax analysis can be reused. The only thing is that it would still take longer than supporting ShaderLab only without CG...
So I'm not sure now what's best. Maybe ShaderLab first, then JS, and then CG?
Hopefully I helped a little with that... just bought your asset a few minutes ago. Will play around with it today and am also looking forward to auto-completion. Would love to do everything within Unity itself, so thank you for creating SI2 and continuing to support it!
Nice! Thanks a lot, and I'm looking forward to hear about your impressions soon!
Besides the monkey job I found an issue in handling the generics, so the beta start got delayed a little bit. There were a couple of wrong assumptions in my code on that how generics should behave, so I had to dig in the C# documentation that explains all the details again and rethink how to fix my code. Generics turned out to be more complex than I expected, but I think I've found a nice solution and I'm already working on implementing that... I'll update you soon with the results, stay tuned!
Thanks for the update Flipbookee ! Looking forward to the beta boat
I've made some nice progress in handling the generics, but it still doesn't work completely for members of the constructed types. This screen capture shows its current state:
Those <T> on FindAll have to be all <FGTextBuffer> actually for this to be fully correct... ok, back to work...
Not sure what is the current state for nested T, so I'm looking forward to List<List<T>> or classABC : classDEF<T1, T2> too
I was trying yesterday to use a simple method which I thought may work but it didn't. So I'll be trying something else today, a bit more complex though as it requires more changes. I'd have to modify at least two functions in almost all of my classes used in modeling the internal representation of the type system...
Well, it's same for multiple template parameters, and also same for the nested generics. The List<List<T>> is still a generic class which can only be valid if used inside a definition of a generic class (or generic method) like this:
public List<List<T>> values;
List<List<T>> is a constructed type with one generic type argument which is a generic type, and in its current state Si2 can offer completions after typing "values.|" (same as if the type was just List<T>), but it still doesn't offer completions after typing "values.|" because the type of that is still T because it doesn't get substituted with the template argument, which in this case is List<T>.
List<List<int>> would be a constructed type from the generic type List<T> where the template parameter T is also a constructed type from the generic type List<T> whose template parameter T is an int. This could be used outside of the JaggedList class...
So basically what is still missing is the substitution of the template parameters with template arguments for the members of constructed types. Complication comes because in my model of the type system all symbols are nested within other symbols forming a tree like structure, and resolving happens in context of their parent symbols, and also all parents of the parent. Constructed types are not following the same pattern because resolving has to happen in context of the generic type definition that will only resolve types up to T since the constructed type is not a parent of that generic type, and it cannot be a parent because there could be a List<int> and a List<string> but there's only one List<T>... Sorry for my long explanation, might be confusing
The nested generics (at least for the JaggedList example above and similar) work now!
It took me a little while to understand what I was doing wrong, until I found this summary of all types of generics and their differences:
The difference between open constructed types and closed constructed types in particular was the one giving me headaches which I had to understanding first. Then the solution was very obvious and easy to implement without too many changes...
Now I'll have to test this with some twisted examples and variations... Let me know if you can think of anything complex enough - I'd love to try that too.
Sounds complicated, thanks for the information anyway partially understand it But it's always good to hear about the progress
btw, I've just found that folder names that start with a dot will not import into Unity (does not show in Project Folder). Not sure if it will help you to have invisible settings or something
still patiently looking forward to the beta boat
Having uninstalled MonoDevelop, I've been using Script Inspector 2 exclusively, and am really missing auto-complete as a newbie programmer. I'd like to get in also on the beta when it's available! Thanks!
Woah Korindian! That's a very brave move!!! And it makes you absolutely awesome!
I guess then for debugging you completely rely on Debug.Log and call stack navigation from SI Console? Adding debugging feature to Script Inspector may take several months more, and I'm still not 100% that's doable. Debugging standalone builds or builds running on devices is almost for sure possible, while debugging the game running inside the editor and the editor scripts themself might be a little bit problematic, although I hope for the best. Just imagine, if my plans happen to be possible, you will be able to see Unity as it stops its own execution, let's you interact with code and inspect variables, step debug, and then continue the execution! This may sound impossible at first sight, but there is a trick he, he...
I've counted finally how much work is needed to get to the beta, and it came down to something like 20 hours only!
Good to know, setting my alarm clock for 20 hours from now to grab the beta.
You're right, I am using Debug.Log for the scripts I'm writing, but also using Playmaker's debug functionality for the logic done using Playmaker. All the future possibilities of SI2 seem really cool.
Looking forward to the beta... how do we opt-in once it's ready?
I don't know how debugging works in Playmaker, but I know Debug.Log is saving me lots of time and in most situations wins against MD easily :
Opting-in will be simple - you'll send me a PM with your email so I can send you the package when it's ready and updates later on, your Unity version and OS, and maybe your real name would be nice too, if you don't mind sharing that with me . Providing some feedback after trying it will be also nice from your side and highly appreciated
Nice, will do.
One thing I noticed while changing the theme of SI2 is that it's a bit tricky to get certain colors right, such as the "background" and "lineNumbersBackground" colors. The tricky part is that entering the RGB color value doesn't display that exact color for those fields. Instead, I also have to adjust the opacity in order to get the colors I want, and it requires a bit of trial and error experimentation of combining RGBA values to get the color I want.
It's been a while since I've experimented with it, so excuse my bad memory, but I think if I set the background color to a gray color (for example, 60, 60, 60, 255), the background still shows as black. I'd have to use some values such as (62, 86, 94, 128) in order to get the gray color I wanted (the end result being equal R, G, and B values). This only happens with background colors... all the font colors display the exact color I set.
Hmm, interesting... I've never noticed such issue, but I'll check that once I finish the beta. Now I'm just trying to focus on the beta only and do as much more as I can before the weekend starts. On working days it's really hard to find enough time to concentrate and get much done, but these are all small tasks so I can still nail down one or two per day. Trying to get done as much as I can of these, so hopefully I'll have enough time this weekend to finally finish the beta with all the tests, wrap it and send it to you guys.
I just re-read the first post in this thread and I couldn't believe I posted that 7 and a half months ago! BTW, it's an amazing post, everyone who wants to know how code auto-completion really works should read it ! To be honest at the time I posted that I wasn't really sure that's the correct way to do this, and there were still many area not so clear or I had no idea how to implement them yet ... Luckily it seems now I've done all of that, yeaaaaah! :
But it took very long time to do all that, much much more than I expected! It's been almost a year since I started working on this! And sometimes it looked like there will be no end, like ever, as I was discovering new "hidden" features of the language, again, and again...
I would like to say a big THANK YOU to everyone who was supporting me on this long journey. I would never succeed without you!
Beta starts on Monday, and I would appreciate if you can help me a little bit again now with a small contribution to this project - try it, test it, and report all the bugs back to me. I hope at the end you will be all as proud as I am for being part of this cool project!
Auto-completion works for C# only for now, so I'll need C# programmers only for this beta ... To join the beta all you have to do is to PM me with your email address, Unity version (must be 3.5 or better), your OS, and your real name if you feel like sharing that info with me. Monday is still 3 days away, but I really hope everything will go well and it will be ready by then
Thanks a lot!
Hoo Ah !!
What a journey man, congrats on the work done. Lets get the beast out in the Arena!
Why can't the beta just be downloaded form the asset store?
Well, that would be a release then. I have to first make sure the quality matches the previously established standards. This has always been a 5 stars extension, since the very first day, and I'd like to keep it like that
Also Beta means it's not fully finished or not fully tested, so I'll have to include a warning in the release notes: "use it on your own risk and backup often" . I don't want to scare you off as I am pretty confident that nothing bad will happen, but still I believe it's good idea to be cautious since there's a lot of new code that needs to prove it deserves to be included.
Thanks Novack! I count on your help this time again Your feedback with the previous beta was just awesome!
Beta was supposed to start yesterday but it isn't ready yet. After noticing that nested generics don't work in some scenarios I had to change the resolving algorithm, so I did that over the weekend but this change affected the format of my internal representation of the type system which I use for collecting the completions. So I have to also change that part of my code to make it work with the new format... I was trying to finish that until late in the night yesterday, but I couldn't. It was too much work for a single evening... will try again now, and maybe tomorrow evening again if I can't complete all today... and I'll let you know when that's done, or you'll receive my email with the package for testing... Thanks for your patience!
Thanks for the update! Looking forward to getting my hands on the beta.
Hoping big to nail down all the rest this weekend and finally start the beta
Yeah, very long waited ... Next must-have feature : project panel Ha ha, just release it first, there are tons of idea I want to put for this plugin ! Brilliant work man.
Yeah, very long ... I'm working on it every single moment, even trying to reduce my sleep time to around 5 hours a day. The thing is that the more busy you are the less noticeable it is how fast the time actually flies. I've lost track of time, just noticed now it's been very long time...
Anyway, the good news is that since a couple of days ago I've started using the new SI to fix it's own bugs, and it actually seems to work in most cases (except those which are still broken )! And the good news of the day is that I caught myself thinking "Wow, this Sublime Text got improved so much, it gives full completions and even shows me the types of variable and function signatures?". And then I realized I was using the new SI instead hehe
Amazing stuff, can't wait anymore to share it with you guys, even as an early beta as it is now.
Just thinking how about taking some days off your full time work and finish it today man ? I've been even more eager to put my hand on this than developing my own game