Search Unity

  1. Engage, network and learn at Unite Austin 2017, Oct 3 - 5. Get your ticket today!
    Dismiss Notice
  2. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  3. Check out all the fixes for 5.6 on the patch releases page.
    Dismiss Notice
  4. Unity 2017.1 is now released.
    Dismiss Notice
  5. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    Dismiss Notice
  6. Unity 2017.2 beta is now available for download.
    Dismiss Notice

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
    I recommend buying the full livity version as it makes it easier to navigate to scripts written in javascript (some standard assets are still javascript, for instance) and it also includes a boo REPL (an interactive shell that lets you play with unity and your own apis).

    If you later decide you don't want the javascript or boo runtime you can just delete the *UnityScriptProvider.dll and *BooProvider.dll assemblies, it is that simple.

    Livity is still under active development and new unity versions will be supported.

     
  2. fanjules

    fanjules

    Joined:
    Nov 9, 2011
    Posts:
    167
    Well in that case, payment made for full version. As an aside, no idea why Unity doesn't do livity behaviour by default - Unity should hire you! :)
     
  3. robnyg1984

    robnyg1984

    Joined:
    Jan 20, 2014
    Posts:
    1
    Is the Free version of Unity supported by this "plugin" ?
     
  4. bamboo

    bamboo

    Joined:
    Oct 9, 2012
    Posts:
    121
    It is.
     
  5. ujwalbharat

    ujwalbharat

    Joined:
    Jul 28, 2012
    Posts:
    1
    Hi. Great work on the plugin. I was wondering whether livity will ever have support for Visual studio express ?
     
  6. vigrid

    vigrid

    Joined:
    Sep 4, 2012
    Posts:
    3
    Some feedback / a couple of suggestions:

    * Livity and ProBuilder get in each other's way, because they're using the same keyboard shortcut (Ctrl-J). The shortcuts should be configurable.
    * When I manage to get the command panel to appear, page up and page down keys are ignored.
    * Livity's text editor window gets more in the way than it helps, the usual text editing keyboard shortcuts don't work as expected: Ctrl-Backspace to delete a word, Ctrl-Z to undo text edition, Ctrl-Y to redo, intellisense popup disappears when inside parentheses, quote and double quote characters always cause two characters to appear in the editor, no overwrite instead of insert mode in the editor... I could go on.
    * On multi-display setup, the intellisense window opens on the monitor that the mouse pointer is on, instead on the monitor that the text caret is.

    If you have a toolset and a way of working you are used to, Livity might get into your way. Your experience may be different, if you are just starting your Unity adventure.
     
    Last edited: Jan 24, 2014
  7. bamboo

    bamboo

    Joined:
    Oct 9, 2012
    Posts:
    121
    Apparently I can make that work. I'll setup a VS Express testing environment here.

     
  8. bamboo

    bamboo

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

    I'm sorry to hear that, I'll try to address most of your concerns in a separate post but in the meanwhile please try to follow the instructions from this video and let me know if you can get the VS integration to work - http://www.youtube.com/watch?v=lTFdG_Uaia8

    Thanks for the feedback!
    bamboo

     
  9. bamboo

    bamboo

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

    Fair enough, it's an unfortunate thing that Unity doesn't handle global keyword conflicts.

    For now you can assign it a different shortcut by defining a custom menu item in an javascript editor script of your choosing and setting the menu item string accordingly, for example:

    Code (csharp):
    1. @MenuItem("Window/Livity/My Command Palette %g")
    2. static function MyCommandPalette() {
    3.     Livity.Text.UI.Editor.Commands.CommandPaletteMenuItems.OpenCommandPalette();
    4. }
    5.  
    Correct. Only characters and arrows are currently supported there. I'll get page up/down working for the next update.

    I understand the frustration but I think that's an unfair characterization, most standard shortcuts are supported - https://github.com/bamboo/livity4unity/blob/master/KeyBindings.md#livity-key-bindings

    Unfortunately there are a few limitations imposed by Unity itself (Ctrl-Z, Ctrl-Y, Ctrl-S, etc) and time/priority constraints (Ctrl-Backspace). That being said it is my intention to support more and more editing capabilities so you can count on Ctrl-Backspace being implemented soon.

    On Windows Undo is bound to Alt-Z.

    I'm currently working on call info tooltips.

    Yes, that's by design.

    Unfortunately that's a feature of the Unity popup API but I'll see what I can do to address it.

    Thanks again for your feedback!
    bamboo
     
  10. vigrid

    vigrid

    Joined:
    Sep 4, 2012
    Posts:
    3
    Hi bamboo,

    Thank you for a quick reply. It didn't occur to me you extended the Unity Preferences and tried to find a setting in the Window > Livity menu. Maybe changing point 2 from "Enable 'Support For External Editors' in the Livity Live Coding Preferences" to "Use menu Edit > Preferences > Livity tab" would help me find it quickly.

    I enabled the external tool integration and it's working fine now. I'll remove the complaint about VS integration not working from my my original post.

    Thank you, now I'm sure Livity will speed up my coding!
     
  11. vigrid

    vigrid

    Joined:
    Sep 4, 2012
    Posts:
    3
    I could swear there's something that you could leverage when it comes to Unity's undo/redo handling (UnityEditor.Undo class?), but I don't know how is it applicable for Livity's text editor. I'm not sure if alt key bindings are a good idea, especially in text editors - some keyboard settings may reserve these for regional / accented characters.

    Visual Studio / ReSharper address quote handling in a different (for me: better) way. They put two quote characters when you first type them, but when you're inside quotes, and caret is just before the quote character, another quote keystroke just moves the cursor forward without adding extra characters. Maybe this could be an option, if you don't intend for it to be the default behaviour.

    I realize my complaints about the editor come from my work habits.

    Thanks for addressing my concerns! I'll keep an eye on the updates :)
     
  12. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,418
    How in the world did I miss this?!

    Well thanks to the 24 Hour Sale bringing attention to it...sold! :D

    I've been using TextMate this entire time, so having auto-completion is like a new world for me. :p

    You mentiond changing color schemes a couple pages back; while I can of course switch between the ones you've made available, is there any way for me to change specific things, maybe in a preferences file? I personally like it when my commenting is an obnoxious but entirely easy to find/read color, such as DayGlo Green, haha.

    Yay!!

    -Steven
     
  13. bamboo

    bamboo

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

    Thanks for the suggestion I'll improve the instructions.

    That's great to hear!!

    Unity's undo/redo handling works for scene based operations, I couldn't find a ux design that would be satisfying. My hope it's that it becomes possible for editor windows to intercept global key bindings at some point or that they introduce some form of contextual key bindings.

    For now my best best is on the command palette and improving the way users can choose their own shortcuts.

    That's indeed better and currently already implemented for brackets. Consider it done :)

    Thanks for your support and feedback!
    bamboo
     
  14. bamboo

    bamboo

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

    Currently there's no support for providing new color schemes via a preferences file but if you don't mind using a bit of undocumented API in the meantime you can add new color schemes with something like this - https://gist.github.com/bamboo/8607456

    Thank you very much for the support and have fun!
    bamboo

     
    Last edited: Jan 24, 2014
  15. bamboo

    bamboo

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

    I know it's not ideal but you can copy one of the GUI skins under Livity/Skins and then edit the command palette styles under "Custom Styles". The new GUI skin file will appear in the preferences after a refresh.

    Thanks for the support!
    bamboo
     
  16. kreso

    kreso

    Joined:
    Sep 7, 2013
    Posts:
    65
    Hi Bamboo,

    congrats on a great product. I just purchased the all 3 versions in the Asset store for only $20.
    I played with it for 20 minutes. Great documentation by the way!

    Save doesn't actually do much - unless document has Livity assemblies in it. Until I refresh I don't see changes in my document. And that means same waiting times as any other IDE.

    I was very happy when I changed a variable in IDE to see the console change accordingly (during the play mode). Amazing stuff! :)

    My observation is that this has huge potential but is not very usable in a 'real-life' project as it is. For me, IDE is not a big progress comparing to other IDE's. Having it share same GUI Update functions with all Unity stuff inside a project makes it even less appealing to me (sometimes it glitches while Unity updates something else, other than Livity IDE).
    Using shortcuts that are different from default OS command is detrimental to productivity (for me at least).
    And just tried searching for a string in document. It found it and highlighted it but highlight didn't want to go away after finishing search.
    Also, I tried copying string into the searchbox, only to see text being copied over inside the document instead. And then pressing Undo (even ctrl+z) didn't work. Totally unproductive to me.

    I don't want to come off overly critical because I really like this product and strongly believe it has huge potential.

    So, here is my constructive criticism:
    Abandon all attempts on making a half decent IDE. It is so much effort time (and in the end you are using Unity's functions that are not really working for you and there area so many great IDEs). Instead, use that time to make a bad-ass live update system.
    How about - I can click a document in asset window - and click LiveEdit. Then my document is open inside my preferred IDE (sublime? :)), and Livity assemblies are loaded inside automatically. I play with the document do what I want and when I am happy and done editing - i click DONE with Live edit. This will in fact save refresh the doc and remove Livosity assemblies.

    Right now this is completely unusable for me - the time I lose on waiting for Unity to update after each change is probably same I will lose on learning new shortcuts and fixing stuff that I didn't want to do. I do hope you consider working more on the helping people play with code live than building something that is already there (a bunch of other IDE's). I understand that it might be an emotional attachment for you (I have some myself too :)), but that is what I think most people would benefit as well, not just me. I might be wrong of course.

    Thanks for reading!
    Kreso
     
  17. kotor

    kotor

    Joined:
    Dec 3, 2013
    Posts:
    101
    Bamboo, I just bought levity for c#. Whats the difference between lavity and lavity for c# packages ?
     
  18. kotor

    kotor

    Joined:
    Dec 3, 2013
    Posts:
    101
    bamboo,
    I just realized that I could have bought Lavity for 20 dollars instead I just bought Lavity for c# for 25. Can you refund Lavity for c# ? I will buy the other package which is called lavity
     
  19. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,418
    This is exactly what I wanted, thank you!

    -Steven
     
  20. bamboo

    bamboo

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

    Have you been able to buy Livity under the promotional price?

    Please send me a private message with your Livity for C# invoice number so we can work out the refund.

    Thanks!
    bamboo

     
  21. Clement_Shimizu

    Clement_Shimizu

    Joined:
    Apr 13, 2011
    Posts:
    22
    This was an instant buy! Amazing. Very useful for "tweaking" stuff and the watches are really blowing my mind.

    FYI

    having a c# class with the following name will prevent livity from compiling.

    public class location {
    /// stuff
    }

    It spits this error until either c# location or boo varible is renamed, or the c# class is encapsualted in a namespace.

    Assets/Livity/Editor/Markdown.boo(66,9): BCE0049: Expression 'location' cannot be assigned to.

    p.s. first time meeting boo other then the ghost and hamster varieties
     
  22. kotor

    kotor

    Joined:
    Dec 3, 2013
    Posts:
    101
    bamboo.

    I have send you a message. I have a question. Live code does not seem to be working for me. After I make a change what is the procedure. Do I have to save the changes or refresh. I am a little confuse.
     
  23. bamboo

    bamboo

    Joined:
    Oct 9, 2012
    Posts:
    121
    Thanks for the report!

     
  24. bamboo

    bamboo

    Joined:
    Oct 9, 2012
    Posts:
    121
    First you have to mark the methods you want to live update with the [Live] attribute and then refresh once. After that first refresh any changes to live methods should automatically trigger a recompilation.

     
  25. kotor

    kotor

    Joined:
    Dec 3, 2013
    Posts:
    101
    Bamboo,

    I have done that but it is not working. Just for testing whether I am doing it correctly I have the following code :

    using UnityEngine;
    using System.Collections;
    using Livity.Features.LiveCoding;
    using Livity.Features.CodeWatches;

    public class RotateCube : MonoBehaviour {

    // Update is called once per frame
    [Live]
    void Update () {
    transform.Rotate(0,0,1);
    }
    }

    when I am changing one of the parameter of Rotate function, it is not immediately effecting it. What I am doing wrong ?
     
  26. bamboo

    bamboo

    Joined:
    Oct 9, 2012
    Posts:
    121
    Looks good. Do you see the message "[Livity] Document `RotateCube.cs' is ready for live coding." in the console window?

    if you add a watch to Update like:
    Code (csharp):
    1.  
    2.  Watch.Expression(transform.localRotation);
    3.  
    Does it show and updates?

    Maybe live coding was disabled by accident, can you check the Livity / Live Coding preferences and see if "Live Code Updates" is enabled please?

     
  27. kotor

    kotor

    Joined:
    Dec 3, 2013
    Posts:
    101
    Bamboo, as I was trying to figure why the live code not working, I notice this error throwing up on the console. Do you think is it a installation issue :

    System.InvalidOperationException: The process must exit before getting the requested information.
    at System.Diagnostics.Process.get_ExitCode () [0x00000] in <filename unknown>:0
    at (wrapper remoting-invoke-with-check) System.Diagnostics.Process:get_ExitCode ()
    at Livity.Features.LiveCoding.CSharpProvider.McsBasedCSharpSnippetCompiler.ExecuteCompiler (ResourcePath mono, ResourcePath mcs, System.String arg) [0x00000] in <filename unknown>:0
    at Livity.Features.LiveCoding.CSharpProvider.McsBasedCSharpSnippetCompiler.CompileSnippet (System.String snippet, System.String[] assemblyReferences) [0x00000] in <filename unknown>:0
    at Livity.Features.LiveCoding.CSharpProvider.CSharpLiveCodeCompiler.Compile (System.Reflection.Assembly liveAssembly, Boo.Lang.Compiler.Ast.Module liveModule, System.Reflection.Assembly[] assemblyReferences) [0x00000] in <filename unknown>:0
    at Livity.Features.LiveCoding.Framework.Internal.LiveCodeTracker.Compile (Boo.Lang.Compiler.Ast.Module code) [0x00000] in <filename unknown>:0
    at Livity.Features.LiveCoding.Framework.Internal.LiveCodeTracker.OnCodeChange (Livity.Languages.ParsingResultSnapshot parsingResultSnapshot) [0x00000] in <filename unknown>:0
     
  28. kotor

    kotor

    Joined:
    Dec 3, 2013
    Posts:
    101
    Further investigation reveals that Livity is conflicting with something in my current project. If I create a separate project with only Livity installed, it works according to the documentation. It makes me scratch my head why is it conflicting and how to solve it if I want to use it. Any suggestion will help.
     
  29. kreso

    kreso

    Joined:
    Sep 7, 2013
    Posts:
    65
    Bamboo,
    how about adding a command to Asset window browser? Right click -> Edit in Livity.
    I don't want to use Livity IDE, but would love to use Live code feature sometimes.
    Now I have to change preferences each time I want to open a file in Livity.


    Thanks,
    Kreso
     
  30. kotor

    kotor

    Joined:
    Dec 3, 2013
    Posts:
    101
    Bamboo,

    Do you have any suggestion ? I have tried different things, re-install the package but I am still getting this error. It is not usable in my current project. I bought this to use in my current project. Let me know if you have any advice. Thanks
     
  31. bamboo

    bamboo

    Joined:
    Oct 9, 2012
    Posts:
    121
    Hi,

    Do you have any extension that tries to monitor or control how processes are executed inside Unity?

    And can you please tell me the exact Unity version you're running and the OS?

    Thanks,
    bamboo

     
  32. kotor

    kotor

    Joined:
    Dec 3, 2013
    Posts:
    101
    Bamboo,

    I have Unity 4.3 and I am using windows 8.1. I have playmaker installed. Strangely I tried in JS (JaveScript) and it is working fine but not working in C#. Let me know. Thanks
     
  33. CRIK

    CRIK

    Joined:
    May 13, 2013
    Posts:
    5
    Hi Bamboo,

    I'm using Livity with PlayMaker and I got this error,

    System.IO.FileNotFoundException: Could not load file or assembly 'D:\Project\DrierBoy\Temp/Livity\Temp\S4B2FBD.dll' or one of its dependencies. The system cannot find the file specified.
    File name: 'D:\Project\DrierBoy\Temp/Livity\Temp\S4B2FBD.dll'
    at (wrapper managed-to-native) System.Reflection.Assembly:LoadFrom (string,bool)
    at System.Reflection.Assembly.LoadFrom (System.String assemblyFile) [0x00000] in /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.Reflection/Assembly.cs:520
    at Livity.Features.LiveCoding.CSharpProvider.CompilationResult.get_GeneratedAssembly () [0x00000] in <filename unknown>:0
    at Livity.Features.LiveCoding.Framework.Internal.LiveCodeTracker.OnCodeChange (Livity.Languages.ParsingResultSnapshot parsingResultSnapshot) [0x00000] in <filename unknown>:0

    There is no dll files :(

    When I using Livity alone there is no error, but with PlayMaker I got error above.

    Please check it.
     
  34. rocki

    rocki

    Joined:
    Aug 10, 2012
    Posts:
    1,291
    @Bamboo,

    Can this package be used to dynamically run code during runtime ?

    Cheers.
     
  35. _MGB_

    _MGB_

    Joined:
    Apr 24, 2010
    Posts:
    55
    +1 for FileNotFound exception with Live editing.
    I also have PlayMaker in my project (but unused so far).

    ed: specs: Windows7 64bit, Unity 4.3.1
     
    Last edited: Jan 29, 2014
  36. bamboo

    bamboo

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

    Could you expand a bit more on what you have in mind?

    If you're just looking for a way to generate code at runtime in a game you might be able to use either javascript's eval or boo's compile (in the Boo.Lang.Compiler.MetaProgramming namespace) functions.

    Cheers,
    bamboo

     
  37. bamboo

    bamboo

    Joined:
    Oct 9, 2012
    Posts:
    121
    Thanks for the report.

    I'll be able to investigate it further later Today.

     
  38. rocki

    rocki

    Joined:
    Aug 10, 2012
    Posts:
    1,291
    Precisely, to generate code at run time.
    I had the impression that with Livity one is also able to dynamically change code at run time. Is this not the case ?
     
  39. bamboo

    bamboo

    Joined:
    Oct 9, 2012
    Posts:
    121
    Yes, Livity does change code at runtime as you modify its source through an open buffer/editor.
     
  40. rocki

    rocki

    Joined:
    Aug 10, 2012
    Posts:
    1,291
    Is there a way to allow players to change code dynamically while playing the game ? Not using unity's editor but using unity's IOS or web player ?
     
  41. kotor

    kotor

    Joined:
    Dec 3, 2013
    Posts:
    101
    Any luck with why is it conflicting with PlayMaker ?
    Thanks
     
  42. kotor

    kotor

    Joined:
    Dec 3, 2013
    Posts:
    101
    I guess, It is not very useful to me if it does not work with PlayMaker. I can't get rid of PlayMaker from my project. The whole attraction of Livity is live code change.
     
  43. brilliancenp

    brilliancenp

    Joined:
    Jan 24, 2013
    Posts:
    11
    Bamboo, I just bought Livity C# today, awesome job. Someone may have asked this already, I have not found so and if they have sorry to ask again, but why does Livity mess with the indentation when looking at files from MonoDevelop?

    Thanks in advance
     
  44. brilliancenp

    brilliancenp

    Joined:
    Jan 24, 2013
    Posts:
    11
    Bamboo,

    I have also been running into a pretty consistent error on 'Save Refresh.' from Livity Window. I get a unity Error Box Moving File Failed Moving Temp/Assembly-CSharp.dll to Library/ScriptAssemblies/Assembly-CSharp.dll failed: Access is denied. I have been using unity for a long time on this project and have never seen this before, any ideas?

    Thanks
     
  45. superroxfan

    superroxfan

    Joined:
    Aug 23, 2013
    Posts:
    83
    Hello Bamboo,

    I really love being able to change code at runtime, but find the fact that I have to use your IDE a bit deterring. I've recently began using Sublime 2 Text Editor (Fantastic IDE BTW), and have put down Livity to do so. Do you have plans to support Sublime 2? If so, do you have an ETA? If Sublime 2 was supported my code production time would significantly decrease!
     
  46. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    651
    Hi Rodrigo/Bamboo,

    could you please check the Spam folder of your mail inbox?

    I've sent you two emails about Livity about 3 weeks ago yet the Unity Support Team told me is still waiting for your action to complete the process.

    Thanks for your time.
     
    Last edited: Feb 17, 2014
  47. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    678
    Can I turn off addition of closing ( { etc in the Livity text editor - I prefer not to have close brackets added automatically?
     
  48. vidjo

    vidjo

    Joined:
    Sep 8, 2013
    Posts:
    97
    Is this project still being worked on? Whats the road map for new features look like?
     
  49. friuns3

    friuns3

    Joined:
    Oct 30, 2009
    Posts:
    232
    HI i found "References to static methods must be fully qualified in C#."

    Will this be fixed? I have a lot static variables in base class. And [Live] not work have to modify every method
     
  50. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    678
    Hmm I've got no replies to support email either. Don't know what happened to author