Search Unity

Livity - The Live Coding Tool for Unity

Discussion in 'Assets and Asset Store' started by bamboo, Aug 12, 2013.

  1. bamboo

    bamboo

    Joined:
    Oct 9, 2012
    Posts:
    121
    Unfortunately there are no plans for supporting 3.5.7 right now. There are a few dependencies on Unity 4.0+ APIs and features that might be just too expensive to replace.
     
  2. bamboo

    bamboo

    Joined:
    Oct 9, 2012
    Posts:
    121
    Thanks for your interest, Santtu S., a c# version is already in the making.

    About a possible competitor from Unity in the future all I can say is that I am not aware of any developments in that area.

    And yes, debugging is in the long term roadmap for Livity, to be tackled once the community is satisfied with its live coding and coding assistance features.

    Cheers!

     
  3. robin_notts

    robin_notts

    Joined:
    Apr 7, 2010
    Posts:
    86
    Agreed.
     
  4. Deleted User

    Deleted User

    Guest

    Purchased Livity for Unityscript ;)

    i will wait an update that supports more than one function "per module" for the live code feature ( for now only one function is limiting ).
     
    Last edited by a moderator: Aug 26, 2013
  5. bizziboi

    bizziboi

    Joined:
    Feb 24, 2013
    Posts:
    18
    It was an insta-buy for me, but in all fairness, for now I am disappointed.

    It has great potential but two things made it pretty unuseful for my intended purposes:
    1) The 'only one' live function makes it nice for tweaking formulas, but that's about it. Code is hardly ever centered around one function body. I was hoping this would make me switch from my current prototyping setup in lua, which allows me to change and live change, add or remove any function from any class when reloading. It allows me to plot out the skeleton as I go, which is much more useful than being able to microtweak a function's body.
    Yes, for the particle example it's nice, but not many things require algorithmic tweaking to that extent, much of that (in general) is just parameter tweaking, for which the inspector works just fine.
    2) I was really assuming this came with source and thus would finally be a good way to see *how* to use the power of boo. The Unity presentation from...2010 I believe, made me drool about the possibilities of boo, but resources are scarily scarce. This asset was created by the guy that created boo, what better way to learn than from his advanced work? Alas - it's all dll's, so no way to learn, and if - heaven forbid - the project gets abandoned I am left with nothing. I know there's a git repository - could people that purchase the plugin at least get read access to that?

    Don't get me wrong, I love the tech - and it's something I was pondering but is beyond my understanding of .NET, and it has massive potential, but as is it doesn't really add to my arsenal - a shame.
     
  6. bamboo

    bamboo

    Joined:
    Oct 9, 2012
    Posts:
    121
    Thanks, Andrea. The one function per module limit will be lifted very soon.

     
  7. bamboo

    bamboo

    Joined:
    Oct 9, 2012
    Posts:
    121
    Hi bizziboi,

    Thanks for the valuable feedback.

    The limit of one live function per script will be lifted very soon.

    About the source code I'll consider your suggestion. Some features are already implemented as Boo code released as part of the project but It's a hard balance sometimes to decide whether to include source code as part of the project but risking it not being loaded because of project compilation errors.

    In the meantime I'd like to invite you to join the Boo google group, the community there can help you cultivate your Boo-Fu.

    Cheers!

     
  8. Sashimi_2

    Sashimi_2

    Joined:
    Jun 26, 2013
    Posts:
    30
    As soon as this happends for unity.js and is on the assetstore Ill gonna puchase it.

    Cheers,
    Sash
     
  9. snoopbaron

    snoopbaron

    Joined:
    Mar 21, 2009
    Posts:
    88
    Just purchased the UnityScript version. The instant feedback is great! I'm looking forward to seeing where you take it Rodrigo :).

    I have a few suggestions. I would like to be able to select an expression then activate a hotkey and have that expression wrapped in a Watch.Expression(...) call and the required import added to the script if it is not already there. Also if the same hotkey is pressed a second time with the cursor on any part of a Watch.Expression have it remove the call to Watch.Expression. Also I would like the option have Livity respect my external editor preferences with a command to selectively open in Livity. This way I can continue to use my existing editor (still Emacs ;)) along side Livity.

    Kind regards,
    Fernando
     
  10. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I'm on the same C# boat. When that comes out I'll buy no questions asked. Subscribing to this thread. This is awesome!!!
     
  11. Sashimi_2

    Sashimi_2

    Joined:
    Jun 26, 2013
    Posts:
    30
    could not wait, purchased it for java script.

    plain awesome! cant wait for the live function lifted to be used with more than one function.

    everybody doing some low level scripting or in deep high level programming should purchase this tool, its worth it.
    it makes coding so much more fluent and fun, even besides the live coding function.

    cheers,
    sash
     
  12. bamboo

    bamboo

    Joined:
    Oct 9, 2012
    Posts:
    121
    Thanks, Sashimi!

    I think you'll be pretty happy with the next update.

    cheers,
    bamboo
     
  13. bamboo

    bamboo

    Joined:
    Oct 9, 2012
    Posts:
    121
    Thanks, Fernando! :)

    Your suggestions make a lot of sense and I'll implement both in future releases (editor preferences already included in the next one).

    By the way, how would you like to live code from Emacs? ;)

    Cheers!

     
  14. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Is an update to the script editor close or you are mostly working in the C# versions due to demand?
     
  15. bamboo

    bamboo

    Joined:
    Oct 9, 2012
    Posts:
    121
    While I'm relentlessly working to get the c# version out ASAP I haven't forget your suggestions and requests for improvement ;)

    I'm submitting v0.1.3 right now with the following improvements:

    * support for arbitrary number of live functions per script (yeah!)
    * ability to select which file extensions should be handled by Livity
    * CTRL+] and CTRL+[ to 'Indent Selection' and 'Outdent Selection' respectively
    * show livity preferences in the Unity preferences window
    * better standalone preference window organization following unity design

    I'm also very close to a breakthrough that will make the whole workflow much smoother, stay tuned!
     
  16. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Thats great news, Good Job Rodrigo!
    Eager to update :)
     
  17. snoopbaron

    snoopbaron

    Joined:
    Mar 21, 2009
    Posts:
    88
    Great I'm looking forward to the next release!

    That would be amazing :)! Are you planning on supporting any external editor or adding support for specific editors? I can understand if us Emacs users are not high on that list ;)

    Btw, Livity reminded me of a Bret Victor presentation that I think I found via one of your tweets? Is Livity inspired by some of his UI ideas? It is exciting that you are not only working at the language level but at the tools level.
     
  18. bizziboi

    bizziboi

    Joined:
    Feb 24, 2013
    Posts:
    18
    Hmmm, it seems I can't add local variables to the function while livecoding - will that be solved? I can see the problem with adding members or functions while livecoding (although I hope that too will be possible one day) but adding local variables would be nice.

    As mentioned before, I am spoiled wrt livecoding - my Lua codebase supports adding fields and methods at runtime.
    Sadly my backend engine isn't near as feature rich as Unity, and even if I hooked up Lua to get the livecoding experience, the outlook of having to port it to C#, JS or Boo afterwards isn't that tempting - this is where Livity has the huge bonus.
     
  19. bamboo

    bamboo

    Joined:
    Oct 9, 2012
    Posts:
    121
    I thought so :)

    Bret Victor's work is indeed a great source of inspiration. Exciting times!
     
  20. bamboo

    bamboo

    Joined:
    Oct 9, 2012
    Posts:
    121
    Local variables are supported but currently they can't be named after members of the enclosing type. Maybe that's what you're experiencing? I'm sorry for the inconvenience, that limitation will be lifted soon.

    By the way, it will be possible to add functions while livecoding, oh yes, it will. :)

     
  21. bizziboi

    bizziboi

    Joined:
    Feb 24, 2013
    Posts:
    18
    Ah, it could well be I was shadoing members or globals. Given that it was a quick test there was definitely items name 'test' - so used to scoping that it hadn't occured to me.

    "Yay" regarding adding functions with livecoding :eek:)

    As said, I am very excited about the project's posibilities so I am hoping initial reception is great - I believe it could easily become the Asset Store's best seller once it matures.
     
  22. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,269
    Looks good, I'm interested to know how good the auto complete is in the editor, as it isn't good in monodevelop for JS and can be slow in C#?
    Will it quickly bring up suggestions for your own classes variables as you type - something close to Visual Studio's Intellisense?
     
  23. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Im using UnityScript in Livity and I can tell you that autocomplete is better than monodevelop. When there is also info displayed about function arguments somehow, it will be of course even better. Go for it.

    On the side note:
    Rodrigo can we please have a shortcut to "Save|Refresh" or let us know how and where to define our shortcuts?
    The indent update is nice :)

    Thank you
     
  24. bamboo

    bamboo

    Joined:
    Oct 9, 2012
    Posts:
    121
    Hi Nuverian,

    I'm glad you liked the update, I've just submitted a new one that includes bracket matching and I think you'll like it too :)

    Here's a quick example on how to define your own keyboard mode binding ALT+UP to TransposeLineUp, ALT+DOWN to TransposeLineDown, CTRL+S to Save and CTRL+R to Refresh.

    Code (csharp):
    1.  
    2. import Livity.Composition
    3. import Livity.Text.UI.Editor
    4.  
    5. [Export(IKeyboardModeProvider)]
    6. class CustomKeyboardModeProvider(IKeyboardModeProvider):
    7.     Name:
    8.         get: "Mine"
    9.    
    10.     def KeyboardModeFor(editor as ITextEditor):
    11.         return KeyBindings() {
    12.             "&up": editor.Operations.TransposeLineUp,
    13.             "&down": editor.Operations.TransposeLineDown,
    14.             "^s": { editor.Operations.ExecuteCommand("Livity:Save") },
    15.             "^r": { editor.Operations.ExecuteCommand("Livity:Save:Refresh") }
    16.     }
    17.  
    Also on https://gist.github.com/bamboo/6481736 in case the formatting gets messed up.

    Notice that this example will only really work on OSX since CTRL+S and CTRL+R are already taken by Unity on Windows in which case ALT+S/ALT+R could be used instead.

    After saving and refreshing you can select the newly defined keyboard mode in the Livity keyboard preferences section "Default Keyboard Mode".

    For a more complex example please take a look at KeyboardModes.boo shipped with Livity but of course always feel free to ask any questions here.

    Cheers,
    Rodrigo

     
  25. GennadiyKorol

    GennadiyKorol

    Joined:
    Jul 10, 2010
    Posts:
    107
    As others have said - an instant purchase once the C# support is there.
    If you need some passionate beta testers then we would love to help, too :)
     
    Last edited: Sep 9, 2013
  26. bizziboi

    bizziboi

    Joined:
    Feb 24, 2013
    Posts:
    18
    Wait...UnityScriipt did get the 1.3 release with support for multiple functions and the Boo version didn't?
    That's odd - and disappointing!
     
  27. bamboo

    bamboo

    Joined:
    Oct 9, 2012
    Posts:
    121
    I can understand your disappointment, bizziboi but I did submit the boo update as I always do but since they are different packages they are handled separately by the asset store team and they just didn't get to it yet. Patience :)

     
  28. bizziboi

    bizziboi

    Joined:
    Feb 24, 2013
    Posts:
    18
    Ah okay, I was worried you had decided to drop Boo support for lack of interest (guessing there aren't many Boo coders).

    Patience......argh! ;)
     
  29. bamboo

    bamboo

    Joined:
    Oct 9, 2012
    Posts:
    121
    Last edited: Sep 11, 2013
  30. neoxeo

    neoxeo

    Joined:
    Jun 1, 2013
    Posts:
    32
    Fantastic !

    Very good news for all.

    Thank you.
     
  31. bizziboi

    bizziboi

    Joined:
    Feb 24, 2013
    Posts:
    18
    The combo pack is an instant buy for me, despite having the boo version already. Plain awesome :eek:)
     
  32. bizziboi

    bizziboi

    Joined:
    Feb 24, 2013
    Posts:
    18
    Absolutely amazing.

    Immediately have 3 questions:

    - Am I right in thinking that in order to add a method or member at runtime I have to refresh? If so, is there any way to prevent variables from being reset? (making them serialized or something or an attribute?)
    - In order to make a function [Live[ I have to refresh as well, correct?

    - Readme mentions a few interesting things, most importantly:
    Live coding from VS: how?

    Oh darn, more questions:
    The REPL, can it support multiple lines? When I type def a(b): on the first line and press enter it gives me errors, shouldn't it expect a block?

    Thx :eek:) Happy as a clam, livecoding in c# and a live updating boo learning tool, what more could one want? (well, okay, I have a few wishes.....)

    But as said, amazing.
     
    Last edited: Sep 11, 2013
  33. gruddlebug

    gruddlebug

    Joined:
    Mar 11, 2013
    Posts:
    65
    Hello,

    I've just bought the C# version

    All I can say is - Incredible!!!


    Thank You

    Paul
     
  34. Wild-Factor

    Wild-Factor

    Joined:
    Oct 11, 2010
    Posts:
    607
  35. sinoth

    sinoth

    Joined:
    Jan 15, 2013
    Posts:
    30
  36. bamboo

    bamboo

    Joined:
    Oct 9, 2012
    Posts:
    121
    Great! Thank you very much for you support, bizziboi!

     
  37. bamboo

    bamboo

    Joined:
    Oct 9, 2012
    Posts:
    121
    Yes, currently in order to add new members it is necessary to refresh, I'm working on an update that will allow new methods to be added on the fly (yeah!).

    You can make fields serializable by declaring them public or by marking them with [SerializeField] attribute.

    Yes.

    Install the Livity Studio extension (currently only available for VS2010, VS2012 version coming soon) then:

    1. Start Unity on any project with Livity for C# installed, just make sure you don't have the WebPlayer target selected and Unity/Preferences/Player/[Run in the background] is checked
    2. Open your Unity csproj with Visual Studio
    3. Tools/Toggle Live Coding (or CTRL+ALT+SHIFT+L CTRL+ALT+SHIFT+L)
    4. Code your Live methods away! All your changes from Visual Studio will be reflected on Unity.

    Just remember NOT to save the files from VS while live coding otherwise Unity will recompile the project when it gets the focus.

    I'll release a new update soon with that feature.


    Thanks! I'm very happy with the feedback!
     
  38. bamboo

    bamboo

    Joined:
    Oct 9, 2012
    Posts:
    121
    Thank you!

     
  39. bamboo

    bamboo

    Joined:
    Oct 9, 2012
    Posts:
    121
  40. bamboo

    bamboo

    Joined:
    Oct 9, 2012
    Posts:
    121
    I'll be releasing a version compatible with VS2012 soon. :)
     
  41. lilymontoute

    lilymontoute

    Joined:
    Feb 8, 2011
    Posts:
    1,181
    Any chance of Sublime Text integration, or would I be able to do this myself (is there a public API)? If so, I'd grab this in a heartbeat.
     
  42. fmarkus

    fmarkus

    Joined:
    May 22, 2010
    Posts:
    181
    Fantastic news!
    mmmm I bought the UnityScript version to try it but I use C#... Is there a way to transfer the license?
     
  43. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,408
    Got the c# version, thanks!

    Using that "CustomKeyboardModeProvider", would it be possible to add F1 help,
    so that it opens scripting reference (for the word where cursor is..as in uniScite) ?

    And ctrl+d for duplicate line or selection?
     
  44. eskimojoe

    eskimojoe

    Joined:
    Jun 4, 2012
    Posts:
    1,440
    Does the C# version do single-step debugging, watching variables on the fly?
    Do you have a free trial version?


    I'm looking to replace UnityVS with Livity. That means that it must match features found in UnityVS.
    UnityVS generate Unity project files on VS, debug (but does it badly) on VS.
     
  45. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
  46. propapandagames

    propapandagames

    Joined:
    Jan 1, 2013
    Posts:
    70
    Another vote for Sublime Text integration. I purchased Livity (Boo version), but I just can't see it replacing my default editor for various reasons.
     
  47. bamboo

    bamboo

    Joined:
    Oct 9, 2012
    Posts:
    121
    Yes, Sublime Text integration is definitely coming. I'll post more details here soon.

     
  48. bamboo

    bamboo

    Joined:
    Oct 9, 2012
    Posts:
    121
    I'm talking to the asset store team and I'll get back to you soon.
     
  49. bamboo

    bamboo

    Joined:
    Oct 9, 2012
    Posts:
    121
    Hi,

    I've updated the original gist to include possible implementations for both. In the case of duplicate line a different strategy is required because Unity already owns the key binding and actually dispatches it as a command named not surprisingly "Duplicate" :)

    Code (csharp):
    1.  
    2. import Livity.Collections
    3. import Livity.Composition
    4. import Livity.Text.Data
    5. import Livity.Text.UI.Commands
    6. import Livity.Text.UI.Editor
    7. import UnityEngine
    8.  
    9. [Export(IKeyboardModeProvider)]
    10. class CustomKeyboardModeProvider(IKeyboardModeProvider):
    11.     Name:
    12.         get: "Mine"
    13.    
    14.     def KeyboardModeFor(editor as ITextEditor):
    15.         return KeyBindings() {
    16.             "&up": editor.Operations.TransposeLineUp,
    17.             "&down": editor.Operations.TransposeLineDown,
    18.             "^s": { editor.Operations.ExecuteCommand("Livity:Save") },
    19.             "^r": { editor.Operations.ExecuteCommand("Livity:Save:Refresh") },
    20.             "f1": { Help(editor) }
    21.         }
    22.        
    23.     def Help(editor as ITextEditor):
    24.         word = editor.DocumentNavigator.CurrentWord.Text.Trim()
    25.         if string.IsNullOrEmpty(word): return
    26.         Application.OpenURL("http://docs.unity3d.com/Documentation/ScriptReference/30_search.html?q=$word")
    27.        
    28. [Export(ICommand)]
    29. class Duplicate(DocumentCommand, INamed):
    30.     Name:
    31.         get: "Duplicate"
    32.  
    33.     override def ExecuteCommandOn(doc as ITextDocument):
    34.         line as ITextSnapshotLine = doc.CurrentLine()
    35.         newText = (line.Text if line.IsTerminated else "\n" + line.Text)
    36.         doc.Insert(line.End, newText + "\n")
    37.         doc.Caret.MoveDown(1)
    38.  
    39.  
    Just keep in mind that I'll include Duplicate in the next update as a native command in which case you'll probably want to delete yours unless you want a quadruplicate effect :)
     
  50. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Well, in my option the goal here would be to make Livity editing features to be compare to Sublime (which, yes is perfect even missing intelisense) and not the opposite, meaning to disregard Livity IDE. At least that's my wish.
    Bringing Livity editor closer to sublime's inteligent highlighting and coloring + sublime key editing features will be great. I guess that's the reason why poeple prefer Sublime over using Livity IDE as of now. Elaborate

    PS:Im a Sublime fanatic myself

    --EDIT--
    In respone to various relevant posts
     
    Last edited: Sep 12, 2013