Search Unity

MonoDevelop.Unity - Community Effort!

Discussion in 'External Tools' started by Reapazor, Jul 8, 2009.

  1. Reapazor

    Reapazor

    Joined:
    Jun 19, 2008
    Posts:
    172
    Hello Everyone,

    After a bit of work we have cleaned up an internal hack for MonoDevelop and are releasing it to the world for use.

    It has been released under the same open source license as MonoDevelop (MIT/X11), so feel free to use it how you like. The installation/download instructions are available on the below listed Wiki, as well as links to the source and a bug tracker.

    We are hoping that there might be a few people out there in the community? or even at Unity wanting to contribute to making this an excellent addition to MonoDevelop.

    http://wiki.dotbunny.com/Projects/Applications/MonoDevelop.Unity

    Right now it just supports C#, but we are hoping someone might help out on the JavaScript part, and many other possible features.

    Anywho, I'm terrible at writing these things as you can see ... enjoy.
     
  2. Mark-Ripley

    Mark-Ripley

    Joined:
    Aug 22, 2007
    Posts:
    116
    That's great - worth it for the ability to highlight an api and go straight to the docs alone :)

    Well done :)
     
  3. Quietus2

    Quietus2

    Joined:
    Mar 28, 2008
    Posts:
    2,060
    Is this based upon the 2.2 alpha preview?
     
  4. Reapazor

    Reapazor

    Joined:
    Jun 19, 2008
    Posts:
    172
    It's based on the SVN trunk for much of the add-in methods.

    There IS a difference between the frameworks in the windows Preview and the Mac Preview. The Mac Preview got an update a few days ago.

    I'm running it in v2.1 :)

    If theres a bug let us know : http://bugs.dotbunny.com
     
  5. Deleted User

    Deleted User

    Guest

  6. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,603
    For UnityScript there is already a solution
    Its C# devs only that are in the "bad position" on OSX
     
  7. Reapazor

    Reapazor

    Joined:
    Jun 19, 2008
    Posts:
    172
    We definitely want to add JavaScript support to MonoDevelop, and it seems the MD team is behind that idea.

    Its just finding the time to do it :) Hence why we're opening the Add-In up to contributions.

    (added to the script editors part of the unify wiki as well - it was also already in the projects section)
     
  8. Deleted User

    Deleted User

    Guest

    very good news :)
     
  9. amcclay

    amcclay

    Joined:
    Aug 8, 2006
    Posts:
    143
    So, I installed the add-in - What difference should I notice when it is installed?

    I don't see any inline docs or any new functionality in the contextual menus. Am I missing something?

    Thanks.
     
  10. Reapazor

    Reapazor

    Joined:
    Jun 19, 2008
    Posts:
    172
    Right now its just simply adding hotkeys to search the documentation. (as well as the commands via Help Menu)

    Disables compilation

    And there is now a "New Unity" project option, and you can add unity items (templates) to that project. Unity is auto-referenced there.

    I like this idea of inline documentation, that would be handy :) *looks into it*
     
  11. Reapazor

    Reapazor

    Joined:
    Jun 19, 2008
    Posts:
    172
    Doesn't look so good -- doensnt seem that MonoDevelop picks up documentation inside of files yet. This would have been how we initially would have gotten it to work (this is how its done in UnityDevelop).

    I'll see what i can dig up from the mono guys, but your right that would be awesome.
     
  12. greenland

    greenland

    Joined:
    Oct 22, 2005
    Posts:
    205
    "community effort"
    It's not done. It's nothing now. It will be later. I think that internally though, otee might be looking at monodevelop code and it would be a shame to see any efforts be redundant rather than collaborative.
     
  13. amcclay

    amcclay

    Joined:
    Aug 8, 2006
    Posts:
    143
    Thanks for the info guys.

    Actually, I had played around with trying to get inline docs working, but apparently monodevelop doesn't use the XML doc format. I tried to convert the XML docs to the format that monodevelop uses using mdoc and the method described here:

    http://www.mono-project.com/Generating_Documentation

    I managed to get the existing XML parsed out into individual files and folders, but I couldn't figure out how to get those files to work along side monodevelop as inline xml docs.

    It would be great if we could use the Visual Studio style XML docs: http://msdn.microsoft.com/en-us/magazine/cc302121.aspx

    Anybody ever try creating inline docs with monodevelop / mdoc?
     
  14. Mark-Ripley

    Mark-Ripley

    Joined:
    Aug 22, 2007
    Posts:
    116
    Has anyone managed to get MonoDevelop to work as the default Unity text editor?

    I've set the file type association in Finder for all .cs files, and set the default text editor in Unity Preferences, but for some reason double clicking a script in the Unity Project pane, or double clicking an error message brings up Unitron....
     
  15. amcclay

    amcclay

    Joined:
    Aug 8, 2006
    Posts:
    143
    Yes, this would be a godsend if we could get files to open (properly) in monodevelop.

    I've heard that some people have managed to get this to work (on the PC side) opening things with Visual Studio, it would be great to have this work for monodevelop on the mac.
     
  16. Reapazor

    Reapazor

    Joined:
    Jun 19, 2008
    Posts:
    172
    While I'm far from an expert on this ... I do know that XML/JavaDoc is not in MonoDevelop at the moment. I bugged them about that when we were doing this in the first place.

    I'll try and play a bit with the whole mdoc thing this weekend. See what I come up with too :)
     
  17. Reapazor

    Reapazor

    Joined:
    Jun 19, 2008
    Posts:
    172
    All I'm going to say is ...Yes... inline documentation is coming.
     
  18. Reapazor

    Reapazor

    Joined:
    Jun 19, 2008
    Posts:
    172
    For all those people that have their doubts ...
     

    Attached Files:

  19. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,537
    Sorry to hijack the thread, but MonoDevelop guys are doing a survey of what the users find important. Everyone who cares about MonoDevelop being kick-ass, please fill it in: survey link
     
  20. amcclay

    amcclay

    Joined:
    Aug 8, 2006
    Posts:
    143
    Oh HELLS yes!
     
  21. Reapazor

    Reapazor

    Joined:
    Jun 19, 2008
    Posts:
    172
    No worries Aras, I think that link is quite appropriate in making MD rock :)

    Now for a bit more love ... still need to work on Delegates a bit. Essentially the parser for the documentation is pretty much complete. I'm just adding some more little things like auto linking to the monodoc, assuming MonoDoc shows up on OSX soon.

    I'm really hoping MD gets their own internal project documentation component done for the next release of the Addin.

    Debating even including code examples, we'll see.
     

    Attached Files:

  22. Mark-Ripley

    Mark-Ripley

    Joined:
    Aug 22, 2007
    Posts:
    116
    You tease!

    Seriously, well done and can't wait for the next release :)
     
  23. Reapazor

    Reapazor

    Joined:
    Jun 19, 2008
    Posts:
    172
    LoL, full disclosure ...

    I've had a fair bit of help along the way from the MonoDevelop camp, but I'm at a stand still as to adding this feature to the release version as there are some technicalities I need to discuss with someone from their camp ... who is on a well earned vacation this week. MonoDevelop/Mono really is *nix based at its heart, with ports for Mac/Windows. There is another project which runs along side called MonoDoc, which doesnt seem to have a graphical port for OSX yet. These docs actually belong to it, but MonoDevelop uses them. Thus, I need to talk with thier camp about how I should 'properly' distribute them for each platform. Whether this is an extension in the addin, or if i'm gonna have to have a little button that drops the 3 files used (not really 3) into a certain directory.

    Of course I also would like to figure out the implementation of the iPhone portion of the documentation.

    My thoughts are to keep one set of documentation, but to add certain flags as to what is compatible with the iphone and what is not.

    I haven't used the iPhone version enough to know if I can get away with that, or if i need to pair it to its own custom documentation (which would be hell-ish?).

    I guess I'll start bugging the Unity camp for some help with that decision.
     
  24. HJP

    HJP

    Joined:
    Jul 8, 2009
    Posts:
    152
    Is there a ETA for the mono debugger (command line mdb) for Mac OS X ?
     
  25. Reapazor

    Reapazor

    Joined:
    Jun 19, 2008
    Posts:
    172
    No comment on the MDB.

    Some interesting numbers ...

    The parser I'm using to go through and populate documentation differs slightly from what is used in UnityDevelop. I instead look at the UnityEngine/UnityEditor libraries and generate a list of items that need information.

    That comes out to be something like this ...

    676 Enumeration Objects
    496 Structure Objects
    3023 Calls Objects

    (i haven't written the delegate parser yet, been checking how well the rest works so far)

    After the parser goes through I have ...

    121 Enumeration Objects unfilled.
    147 Structure Objects unfilled.
    864 Class Objects unfilled.

    Now before anyone gets all upset about those numbers, you need to realize that much of that is undocumented functions in Unity, as well as obsolete functions. Using the method that I am to generate documentation I'm going to have a lot of things that the documentation (Script Reference) does not have in it.

    Atleast, once I finalize the parser/updater (so we can do easy updates in the future), I will post all the help xml files in raw form to the Github and hopefully if people really want to fill in some blanks they can add documentation to the project.
     
  26. HJP

    HJP

    Joined:
    Jul 8, 2009
    Posts:
    152
    Ops :? ...

    Awesome work, Reapazor!
     
  27. Reapazor

    Reapazor

    Joined:
    Jun 19, 2008
    Posts:
    172
    Not quite awesome enough it would seem :)

    So in wrangling with writing installation procedures for the documentation, I discovered (I should have known this) that the Windows port of MonoDoc does not have any inline documentation (even for System).

    I'll start bugging to find out what the deal is, but none the less, the documentation also dumps out to a VS format, but that defeats the purpose of ...

    "one addin to rule them all"
     
  28. Reapazor

    Reapazor

    Joined:
    Jun 19, 2008
    Posts:
    172
    So I have the Mac version working? Do we want to release that knowing that the PC equivalent function isnt there ?

    (inline documentation)
     
  29. HJP

    HJP

    Joined:
    Jul 8, 2009
    Posts:
    152
    Yes, please, do it. :p
     
  30. Reapazor

    Reapazor

    Joined:
    Jun 19, 2008
    Posts:
    172
    Hehe, okie I'll try to polish the install part by next week, and will post an upload to the repo thingy-ma-jig.

    Documentation is decent, but could be better :)
     
  31. Reapazor

    Reapazor

    Joined:
    Jun 19, 2008
    Posts:
    172
    Small update for those that care :)

    Inline code re-factoring has been finished in MonoDevelop for Mac, I imagine it is also getting ported to the Windows release.

    I'm going to time the release of documentation with that release; I've been 'promised' it will come out in a week or so.

    Which gives me time to fight with the installation of the documentation a bit. Anyone know a flag to force sudo to ask for password? Everything points to no, but it would be super useful.
     
  32. amcclay

    amcclay

    Joined:
    Aug 8, 2006
    Posts:
    143
    I certainly care! Keep up the good work! Can't wait for docs in MD.
     
  33. Reapazor

    Reapazor

    Joined:
    Jun 19, 2008
    Posts:
    172
    So MD has put out the new monotouch beta, and luckily the updated MD is publically available, so a release of MonoDevelop.Unity is coming really soon.

    I'm toying with the problem people have with MD opening Unitron even when you have MD set as the editor.

    We've tracked it down to an issue with how MD handles apples event handlers. The big difference, that we weren't aware of is how Macs handle file events. Instead of the PC/nix way of passing a parameter, they handle it by opening the application, then passing the file.

    (http://anonsvn.mono-project.com/vie...addins/MacPlatform/MacPlatform.cs?view=markup)

    It seems that MD's event handler for this isnt quite up to speed, so like any good Unity follower were trying to fix that.
     
  34. HJP

    HJP

    Joined:
    Jul 8, 2009
    Posts:
    152
    The new MD beta is not visible for me .... at the moment ...
     
  35. Mark-Ripley

    Mark-Ripley

    Joined:
    Aug 22, 2007
    Posts:
    116
    Yeah, I can't see it either - do you have a link? :D
     
  36. Reapazor

    Reapazor

    Joined:
    Jun 19, 2008
    Posts:
    172
    http://go-mono.com/archive/MonoDevelop-MonoTouch-Preview-20090806-2.dmg

    This is an alpha meant for MonoTouch (mono on the ipod/iphone platform!). But its publicly available, its the supporting libraries that are private.

    This build has some fixes that are used in the upcoming commit of the addin as well as inline code documentation.

    Now trying to reach out to Unity on the problem of opening the file correctly. I've started dabbling in the source of MonoDevelop as well (with some help) and we need some answers from the boys at Unity.

    I'd also like some input ... if the addin 'outputted' a folder to your desktop and gave you the path of where to put it ... that seem fool proof? I'm just not having any luck getting the files where they need to go with using sudo. Mainly reading the process return console if there is output for a password. Blah, I'll keep at it.
     
  37. Reapazor

    Reapazor

    Joined:
    Jun 19, 2008
    Posts:
    172
    I've committed a big chunk of it to the github, I'll be doing some testing to push out the documentation feature this weekend. (Mainly just have to see if the addin still runs on my PC as well).

    The project really could use a little help in the documentation area : http://github.com/dotBunny/MonoDevelop.Unity/tree/master/Documentation/

    I've included my little php script that does the parsing 'so far' any improvements would be greatly appreciated.

    Eventually I'd like to see the docs being filled out a little, as they offer much more then whats shown in the inline docs. When monodoc becomes available for mac, we'll need to tidy them up some more.
     
  38. Mark-Ripley

    Mark-Ripley

    Joined:
    Aug 22, 2007
    Posts:
    116
    Thanks Reapazor :)

    I tried this version out this morning, and found that it wouldn't load my project file. So I created a new project file by firing up the previous version of MD and exporting it as a VS2008 project, then importing it into the new version.

    This worked fine, until I found autocomplete no longer works....

    Has anyone else found this?
     
  39. Reapazor

    Reapazor

    Joined:
    Jun 19, 2008
    Posts:
    172
    I havent had an issue ;/

    I know that the autocomplete was changed in the newer versions of MD maybe a new bug was introduced.
     
  40. HJP

    HJP

    Joined:
    Jul 8, 2009
    Posts:
    152
    I installed the file straight.

    For me, autocomplete works fine. Also, I do not have problems to load my projects. O.k. I had always stored my projects in the VS2008 format. :)

    Thanks Reapazor.
     
  41. Mark-Ripley

    Mark-Ripley

    Joined:
    Aug 22, 2007
    Posts:
    116
    So I thought, "alright, let's give it another go"...and it works fine!

    How bizarre.
     
  42. Reapazor

    Reapazor

    Joined:
    Jun 19, 2008
    Posts:
    172
    Hopefully the opening in MonoDevelop is gonna get fixed :) Finally got ahold of the Unity guys about it.


    Yes I know you want the nice 'compiled' version of the plugin with the help files... I am still having trouble not having compatibility for our PC friends.
     
  43. Reapazor

    Reapazor

    Joined:
    Jun 19, 2008
    Posts:
    172
    We're moving our site around....figured I should preserve some of the installation stuff.
     

    Attached Files:

  44. jimbobuk

    jimbobuk

    Joined:
    Dec 31, 2008
    Posts:
    55
    i see the wiki is down and seemingly the URL that the instructions here try to use.

    I take it this means i can't try to setup the monodevelop.unity at the moment?

    I'm also not clear on whether the iPhone docs are able to be accessed in this way, and also if the latest updated docs are available now that 1.5 has been released (on iPhone)

    Cheers
     
  45. Reapazor

    Reapazor

    Joined:
    Jun 19, 2008
    Posts:
    172
    The instructions are in the post above, the plugin download still works.

    We took down our wiki, well more so moved it internally.

    I still havent pushed out a new version, tho the creative people can pull one from the github.

    Theres something I'm waiting for ... :)
     
  46. jimbobuk

    jimbobuk

    Joined:
    Dec 31, 2008
    Posts:
    55
  47. jimbobuk

    jimbobuk

    Joined:
    Dec 31, 2008
    Posts:
    55
    Ok, I followed the instructions and i think it all installed fine. I can see listed as installed. There was a warning on install, but the instructions said to expect it.

    Anyways I wondered if anyone could point me in the right direction to actually using MonoDevelop for unity scripts. I've been working off of the unity tutorials whilst playing around and they're all done in javascript. Something that MonoDevelop.Unity doesn't support, is that right?

    I tried creating a .cs file and could see some completes working but wasn't clear if they were coming from the MonoDevelop.Unity inline comments or not.

    There is mention of folks setting up project files in either visual studio format or some other format, how exactly do you go about this? Just add all your scripts in their unity scripts subfolder, or is there a better way of adding them?

    Is there a c# sample somewhere i can just open to see if and how the inline comments do/should work?

    There was some mention of compiling in MD, i'm assuming this is not possible, or required, you just use the unity editor itself for building?

    And again as i asked earlier, how do these docs relate to either the 1.5 version released for iPhone (with apparently updated docs) or the iPhone codebase in general?

    It looks great, just a bit of help would be really appreciated on these beginning bits. Even if there's a link to another thread or site with some tips on initial setup for this.

    Cheers
     
  48. Mark-Ripley

    Mark-Ripley

    Joined:
    Aug 22, 2007
    Posts:
    116
  49. HJP

    HJP

    Joined:
    Jul 8, 2009
    Posts:
    152
    Thanks. I use SL without a problem. :)
     
  50. Reapazor

    Reapazor

    Joined:
    Jun 19, 2008
    Posts:
    172
    So after much wait and dismay MonoDevelop 2.2 b1 solves the opening of unity files :)

    I waited, and prayers were answered.

    In prep for Unity's integration with VS/MonoDevelop? I've removed the project type stuff from the plugin as I want to see where they go with it.

    GitHUB has been updated for all those there, as for repo update .. i'll put that out too (just trying to remember how to pack it up)

    One change YOU MUST add a reference to your unity engine yourself, and make your own project. I'm interested to know how Unity is going to handle this themself in their upcoming release. No sense in me wasting more time on something they are already doing.