Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Unity Add-ins for MonoDevelop/Xamarin Studio 5.9+

Discussion in 'Scripting' started by lukaszunity, Jun 1, 2015.

Thread Status:
Not open for further replies.
  1. lukaszunity

    lukaszunity

    Unity Technologies

    Joined:
    Jun 11, 2014
    Posts:
    461
    What is the error? The link to the image no longer works. Are you able to start Xamarin Studio by double clicking it? If not, you might have deleted the Mono framework. Did you move the location of the Xamarin Studio app without updating the external script tool setting?
     
  2. lukaszunity

    lukaszunity

    Unity Technologies

    Joined:
    Jun 11, 2014
    Posts:
    461
  3. azrialelf

    azrialelf

    Joined:
    Jun 1, 2012
    Posts:
    9
    If Unity and Xamarin are soon going to be using the same versions of Mono, does that mean the Xamarin dlls will work in Unity?
    Specifically, I have an application built in Unity that is trying to access an RFID reader on an Android device. I have been able to successfully access the reader and perform reads using Xamarin's Mono.Android library (for making a serial connection).
    However, when I try and use the same code in Unity, (and copy over the Mono.Android.dll into my plugins folder) I get an error that I haven't been able to work around yet:
    "System.TypeLoadException: Could not load type 'Java.Lang.Object' from assembly 'Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065'."

    Is this something that will be resolved with the update to MonoDevelop? Or is this an unrelated issue?
    If it is an unrelated issue, is there any hints you could provide on how I might go about getting this to work?
     
  4. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    5,747
    The image showed the console and the external tool preferences to show that it was setup right.
    It says "unable to open script //path// check application preferences"
    With another project, it works. With this one (mcdroid) it doesn't open the script. On both projects I synched the monodev project.
     
  5. lukaszunity

    lukaszunity

    Unity Technologies

    Joined:
    Jun 11, 2014
    Posts:
    461
    Unity and Xamarin are not soon going to use the same version of Mono. We are going to use more or less the same version of MonoDevelop, which is a C# application thats run on Mono on OSX and on .NET on Windows, which are system installed features. Unity embeds a different version of Mono that Unity and your Unity projects code runs on, MonoDevelop does not run on this version of Mono.

    So this Android issue is unrelated. My best guess for why you cannot load Mono.Android.dll is because is it built with .NET 4.5 and Unity only supports .NET 3.5.
     
  6. lukaszunity

    lukaszunity

    Unity Technologies

    Joined:
    Jun 11, 2014
    Posts:
    461
    What is the full path to the script file you were unable to open?
     
  7. Torston123

    Torston123

    Joined:
    Nov 21, 2012
    Posts:
    3
    Is there any option to run unit test in Xamarin
     
  8. lukaszunity

    lukaszunity

    Unity Technologies

    Joined:
    Jun 11, 2014
    Posts:
    461
    Yes, Xamarin Studio supports NUnit tests. If you select the menu View -> Unit Testing you get a panel on the right with all the units found in the projects.
     
  9. azrialelf

    azrialelf

    Joined:
    Jun 1, 2012
    Posts:
    9
    Thank you lukaszunity for the response.
     
  10. lermy3d

    lermy3d

    Joined:
    Mar 16, 2014
    Posts:
    101
    Hi Lucas, great work for all the hard work on for the integration with the latest Xamarin version. Still some minor bugs to cover but on the right path.

    I am using Unity 5.1.2f1 and Xamarin 5.9.5 and the issue of multiple Xamarin instances still persist even following all of this thread instructions verbatim, right now is quite an inconvenience for us as for productivity concern, so we had to go back to built in MonoDevelop.

    We still have the hope that there is a fix soon, so please let us know, we greatly appreciate all the good work!
    Best regards,
    Lermy
     
  11. Torston123

    Torston123

    Joined:
    Nov 21, 2012
    Posts:
    3
    Thanks for your answer, the unit tests panel this is not the problem i have, actually after clicking Run All Tests, XS can't find any test and crushes with error:
    https://www.dropbox.com/s/ql733nrkrd5i855/Screen Shot 2015-08-14 at 00.01.45.png

    OS x 10.10.4
    Unity 5.1.2f1
    Xamarin 5.9.5
    Unity-Addins-5.9.1

    The link to the project: https://jorgeamado@bitbucket.org/jorgeamado/unity_xamarin_unitytests.git
    It contains only folder with UnityTestTools

    Thanks

    P.S.
    I've set up Project -> Active Runtime -> Mono 4.0.2
    Another options cause error:

    Building: Assembly-CSharp (Debug)

    ---------------------- Done ----------------------

    Build failed. No compatible framework found for assembly '/Applications/Xamarin Studio.app/Contents/Resources/lib/monodevelop/bin/MSBuild/4.0/MonoDevelop.Projects.Formats.MSBuild.exe' (required framework: .NETFramework,Version=v4.0)
    Build: 1 error, 0 warnings
     
    Last edited: Aug 13, 2015
  12. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    5,747
    You must have remotely fixed it because I no longer have that problem with any of the scripts I opened
     
  13. sanpats

    sanpats

    Joined:
    Aug 24, 2011
    Posts:
    343
    Unity 5.2.0 RC1 still open both XS and Unity-MD when select Assets/Open C# Project.
     
  14. lukaszunity

    lukaszunity

    Unity Technologies

    Joined:
    Jun 11, 2014
    Posts:
    461
    These Unity Add-ins for Xamarin Studio 5.9 will no longer be updated and I will no longer monitoring the thread for activity.

    Instead, you can participate in early testing of MonoDevelop-Unity 5.9 in the MonoDevelop-Unity 5.9 Preview Release thread.

    Thanks to everyone who has spent time testing these add-ins and provided feedback!
     
    passerbycmc and Novack like this.
  15. ababab5

    ababab5

    Joined:
    Apr 15, 2014
    Posts:
    508
    Hi,

    My project are refreshing during 2 or 3 minutes each time I modified a script (even if it's just a comment).. Any idea?

    Thanks for the help!
     
  16. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,532
    Running into something really annoying - Find in files consistently hangs my MD (either while searching or when scrolling through the results)
     
  17. sanpats

    sanpats

    Joined:
    Aug 24, 2011
    Posts:
    343
    Did you read a few post above yours that this is no longer update?
     
  18. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,532
    wrong forum :)
     
  19. ababab5

    ababab5

    Joined:
    Apr 15, 2014
    Posts:
    508
    Hi,

    I have a simple question : why Unity reload all my script after each script modification, even if I build the solution with Xamarin?

    Thanks !
     
  20. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,721
    I certainly hope that Unity understands the current bugs with Xamarin studio. The intellisense is horrific and there are so many unfixed issues/bugs with Xamarin studio. MonoDevelop is proven to work. Xamarin is not. Please take the time to look into this. I list the issues with Xamarin studios: cannot handle certain certain structure of comments in the code, Xamarin flags commented code as syntax errors. Most of theese issues are caused by Xamarin not being able to handle fast typists. You start typing too fast, then boom you will run into issues with Xamarin. I couldn't handle it anymore and reverted back to MonoDevelop.
     
  21. Myrddin

    Myrddin

    Joined:
    Mar 20, 2013
    Posts:
    8
    Hi, thanks for you work!

    It seems shader syntax highlighting is not working in MD 5.9.6 Preview Release and latest Xamarin 5.9.7.9.
     
  22. Aurore

    Aurore

    Director of Real-Time Learning Unity Technologies

    Joined:
    Aug 1, 2012
    Posts:
    3,103
     
Thread Status:
Not open for further replies.