Search Unity

Xamarin now free (and supposedly open source)

Discussion in 'General Discussion' started by Acissathar, Mar 31, 2016.

  1. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    Have you published anything to iOS lately? Please, try doing exactly what you just said. Don't just build. Actually publish something, to the storefront.

    From memory, Unity's Mono runtime on iOS is 32bit only (or there was some other restriction to that effect). About a year or two ago Apple changed their policy such that only 64bit apps could be published to their store. (So you can still build whatever you want on your end and the hardware is still capable of running it, they just won't necessarily let you put it on their store.) That's why Unity jumped to IL2CPP on that platform far earlier than they'd intended - it was the fastest way to get 64bit build capability to the people making iOS apps in Unity.

    In that case, IL2CPP was absolutely a "need".

    Edit: This situation as a whole is far more complicated than you seem to give it credit for, and a lot of your proposed solutions simply aren't valid as a result.
     
    elbows, Paulohmm, AcidArrow and 4 others like this.
  2. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    Yeah, I meant to say converting IL then running it natively; I almost edited it but you jumped on it too quickly. :p My point is that converting .NET code into something that eventually runs on a native machine is basically the entire point of .NET and Mono (or any language really). And it would be better to use existing tools that do this (Mono) than make a new one.

    Some of the platforms did have Mono support but only for newer versions of Mono, which they didn't want to use.

    The main reason I don't think it's reasonable is time. If they said IL2CPP was just about finished and so it would only push back the .NET update a few months, then that would be fine. They could release it, and if it sucks, they could switch over to new Mono. If they're pushing the .NET update back a few years just finish IL2CPP, then not much is going to convince me that it's reasonable.
     
  3. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    I think it's the opposite. You're coming up with complications with solutions that happen to coincide with IL2CPP being worked on. If Apple says only 64-bit apps can be published, then the obvious thing to do is to use 64-bit Mono. It is not to say "Hey let's write a tool that converts IL into C++". They couldn't use 64-bit Mono because they didn't want to buy the new license. I mean, almost any complication that can be thought of in regards to getting .NET code to run on a new and popular platform has already been thought about and solved by Microsoft and Xamarin. One might say that Xamarin's sole purpose is to solve the complications of getting .NET code to run on new and popular platforms.
     
    zezba9000 likes this.
  4. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    So what? "Some" isn't good enough.
     
  5. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    That's not what you said a few posts ago, where you seemed to be accepting that 64bit Mono wasn't available to them at the time:
    How could they have responded better based on the information available at the time?



    I am indeed "coming up with complications", the thing is that they're all genuine and valid ones. You can blame the messenger all you want, reality won't change.

    Your solutions all sound great on the surface but, like I said, this situation is far more complicated than you seem give it credit for. A simple sounding solution now isn't necessarily the best course for the long run, since Unity have to look after not just one platform but two dozen, and not just solve today's problems but also provide a platform for tomorrow's. Unity quite understandably wants to keep things as uniform as possible between their platforms, which is beneficial not just for them but also for us. (I hear that having one different .NET backend for one platform was already quite painful, imagine potentially maintaining one for each platform as is the logical conclusion of your suggested approach!) On top of that, others have given plenty of reasons that IL2CPP can be beneficial, and nobody is claiming that it's all roses and unicorns.

    It's easy to pick on things if you look at only a part of the picture.
     
    Last edited: Apr 4, 2016
    Dustin-Horne likes this.
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    Yes, that is in the list of things that need to be done before we can push .NET profile upgrade. However, if there was no IL2CPP, there would be another prerequisite before we can push it out: port the updated Mono runtime to all platforms we support, which is a much, much, much bigger task than rolling out IL2CPP. So effectively, IL2CPP is making .NET profile upgrade come faster.

    Do you really think there's an existing tool to convert .NET IL into WebGL that as sophisticated and functional as IL2CPP that would suite Unity's needs?

    Also, what about all the other platforms that we support that new Mono has no support for?

    And what happens when that native code is for an architecture that Mono doesn't support? We'd need to write a code generator! Sounds easy, right?

    Historically that has not been the case. Unity usually supports new gaming platforms before they're even announced, so any kind of public support from .NET or Mono is by definition impossible at that time. So it'd be all on us to port it.

    You got my message wrong. All of the points I listed are valid today. Not a year or two from now.

    Oh, it has not been in the works for over a year. IL2CPP runs on standalone player internally. It was actually the very first platform to support IL2CPP as it was easiest to develop on. We're just not releasing it since it would require us to actually support it to some extent (fix bugs, etc), and we think that standalone player on IL2CPP is much lower priority than say upgrading Mono.

    What makes you think it's not finished yet? We're currently at single digit bug count with IL2CPP and it is already generally feature complete. Of course, we're still improving it (as we do with everything we support), but there's no big general development feature work that needs to be done.
     
    Last edited: Apr 4, 2016
    elbows, recursive, larku and 10 others like this.
  7. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,930
    I think that @Tautvydas Zilys summarized things really well above, so I won't repeat what he said.

    I will clarify that IL2CPP would indeed be blocking the .NET profile upgrade if it was not done. But for some definition of done (see below), IL2CPP is done.

    Obviously, there is always more work to improve things, but IL2CPP is stable, the code generation portion of it can convert pretty much every assembly we have seen correctly and the runtime supports nearly all of the necessary features for .NET 2.0. Certainly we still have bugs, but they usually live for a day or two before they are corrected. So, if you know of an IL2CPP bug that is not corrected, please let me know! We're still working on improvements for build time and build size, but feature-wise, IL2CPP should be working completely.

    This means that internally, we have been working on a .NET profile upgrade for some time now (even before this news from Xamarin came out). Most of the work so far for the .NET profile upgrade has not been about IL2CPP, but more about general changes need in the Unity engine code to prepare for the newer Mono runtime and compiler. We're also working on upgrading the IL2CPP runtime to support the last .NET profile in parallel to making the change in the engine code.

    So a .NET profile upgrade is coming. Hopefully the first parts of that will start to appear on the public roadmap soon.
     
    Schnelle, rakkarage, kB11 and 11 others like this.
  8. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,568
    I have one potentially, but I need to retest it to see if it's been fixed. At one point, IL2CPP was failing to compile DLLs that were generated using Roslyn (VS2015). I had to compile assemblies for IL2CPP platforms for my asset in VS2013 and the others in VS2015 otherwise it would fail.
     
  9. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,930
    @Dustin Horne

    Can you ping me with the bug number? I'll check on its status.
     
  10. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,568
    I'll have to double check... It's been awhile, but I think someone said they'd look into it when I asked about it so I don't recall if I even created a bug (or perhaps one of my customers did).
     
  11. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    I'm pretty sure this should work correctly today. We shipped support for Windows Store with IL2CPP scripting backend in 5.3, and Windows Store uses Roslyn C# compiler to build scripts.
     
    Dustin-Horne likes this.
  12. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    This means .Net is still better about builde time and build size than IL2CPP ?
     
    darkhog likes this.
  13. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    This makes me feel a little better. Like I said earlier, my main problem is that IL2CPP seems to be holding back any other work on upgrading .NET. But if it's really almost ready for prime time and we'll be getting .NET 4.5 some time soonish and a working Mono runtime in the editor and desktop then I will be a happy camper.

    I love Unity, but I'm simultaneously working on a Unity game and a large .NET 4.5 project and switching back and forth all the time really makes the missing features stand out and poke me in the brain. I'll try to temper my grumpiness.
     
    angrypenguin likes this.
  14. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Yeah badgering unity staff, I take a dim view of and would probably put a stop to it if it went over the line. It's great to enquire, not great to harass, sometimes you bring it pretty close to the wire when you don't need to :)
     
  15. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    YOUR FACE IS CLOSE TO THE WIRE... oops, I mean, uh... Well said, point taken. ;)
     
    hippocoder likes this.
  16. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    I remember this feeling moving between Java and a certain game engine I used to use with its own scripting/programming language. From there I moved to a system where work was all directly in C++. From there I moved to Unity. (A few side steps in between, but that's close enough.)

    My view of Unity's scripting environment is of course influenced heavily by that background. I've never considered myself a ".NET programmer", though in my last job that's certainly what I was considered. The rest of the programming team were somewhat surprised when I explained that as far as I was concerned the system available in Unity was a kick-ass game scripting system, rather than a gimped version of .NET. Comparing it to my prior experience, it offered very nearly the iterative speed and engine integration of a custom scripting language at the same time as offering very nearly the power of working directly in C++ and a (relatively) complete standard library. So I've never really cared about having the latest and greatest .NET features (though I don't deny they're cool) because to me it's just never been about .NET. Mono just happened to be a good functional match for Unity's needs.
     
    zenGarden and Ryiah like this.
  17. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,930
    @zenGarden

    Yes build times with the Mono scripting backend are still much shorter than they are with the IL2CPP scripting backend. We're working to improve IL2CPP build times, but they are still lagging behind.
     
    zenGarden likes this.
  18. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    Xamarin changed their payment model? Is that why they've been spamming the crap out of my inbox?
     
  19. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,145
  20. darkhog

    darkhog

    Joined:
    Dec 4, 2012
    Posts:
    2,218
    Yup. Well, good luck with that. Rube Goldberg machines are by definition slower than doing the action (like flipping the switch) directly.
     
  21. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
  22. tswalk

    tswalk

    Joined:
    Jul 27, 2013
    Posts:
    1,109
    I don't think i'm ever going to be able to look at that work with a straight face ever again.. :D
     
    Deleted User likes this.
  23. mat_muze

    mat_muze

    Joined:
    Mar 17, 2015
    Posts:
    31
    makeshiftwings likes this.
  24. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,145
    It would be pretty stupid to ditch it now after they're practically at the finish line.
     
    hippocoder likes this.
  25. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    I'd like to see you drawing pictures at 60hz, then. ;)
     
  26. darkhog

    darkhog

    Joined:
    Dec 4, 2012
    Posts:
    2,218
    I've meant whole compilation path is one giant Rube Goldberg machine. And that's why it is so slow to build. They'd have better luck if they'd built direct C# to ASM (IL2ASM?) compiler, then use asm.js to play that.
     
  27. mat_muze

    mat_muze

    Joined:
    Mar 17, 2015
    Posts:
    31
    Or IL to WebAssembly (IL2WASM)...
     
  28. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    And lose all the portability? No thanks.

    BTW, that's not how asm.js works.
     
    mrtkhosravi, Ryiah and angrypenguin like this.
  29. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    I know what you're saying. I'm saying it doesn't make sense.
     
  30. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    It makes sense to me. C# -> Mono compiler -> IL, will, unless time travel is involved, always be faster than C# -> Mono compiler -> IL -> IL2CPP -> C++. They can make the second compiler faster but it will never be faster than not doing a second compile at all.
     
    darkhog likes this.
  31. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    Though you could convert IL to asm.js without the C++ step and not lose any portability. There's MSIL and LLILC and as someone posted above, MS/Xamarin are working on an asm.js runtime, though that probably won't be ready for quite some time.
     
    darkhog likes this.
  32. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Well if you want to go hardcore silly: "i love to see pee pee". Inline To C++ is simpler tho :p
     
    darkhog and Tautvydas-Zilys like this.
  33. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    IL is for "intermediate language", not inline. And ain't nobody got time to type "intermediate language" on the internet.
     
  34. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Yeah brain fart.
     
  35. Deleted User

    Deleted User

    Guest

    I prefer the first one..
     
    darkhog likes this.
  36. darkhog

    darkhog

    Joined:
    Dec 4, 2012
    Posts:
    2,218
    Thank you. Thank you so much.
     
  37. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    Yes, but that's not actually what the post I was responding to was saying. The system was being compared to a Rube Goldberg machine specifically in order to discredit it, where some other systems that can be described similarly are actually the fastest known way to do their tasks.

    And that last bit is key - "do their tasks". The new system does not do the same task that the old one it's being compared to does. In some cases it's similar, but on the whole it is not the same.
     
  38. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    985
    I don't think this is being entirely fair. Mono outside of Unity was ported to BlackBerry10 and Tizen independently from Unity. (Sony ported it to ARMv6 HF / PSVita) [Which in turn was ported to RasPi]. Its never been "all on Unity". Now that .NET and Mono are under MIT, we will only see more of this (I hope porting work Unity does will be pushed back into the .NET Foundation eco system). Unity should make it easier for the community to help work on lower end peaces of the game engine.

    What I find a much more important issue over the .NET version or IL2CPP vs Mono vs .NET Core is the stop the world GC IL2CPP and Unity's Mono are using. The newer versions of Mono have had SGEN and .NET has also had a low latency GC for a while time now. Iv'e been noticing the current GC causes frame lag issues in VR if it hits a collection cycle.

    I really hope the GC gets updated more then anything...
     
    Last edited: Apr 9, 2016
  39. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    My main concern is that I've been in the software development business long enough to know that "practically at the finish line" can stretch into months and years. The .NET upgrade's not even on the roadmap yet. And the Unity GUI update was "practically at the finish line" for.. what... five years?
     
  40. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,145
    Yet the alternative, at least if Unity's developers have been any indication, would be "guaranteed n months/years" whereas their current path is only "maybe months/years". Better to stick it out than to suddenly about face a significant way into development. That said I honestly don't expect IL2CPP to be complete until Unity 6. Or at best a very late 5.
     
    Kiwasi likes this.
  41. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I don't think IL2CPP is a creature that can be completed, merely be up to date as it can be with new features and performance as time goes by.
     
  42. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,145
    Right, my wording was pretty bad. I blame a distinct lack of sleep. What I meant was when it's released for all platforms.
     
  43. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Oh I'm not picking on your points or anything, just mumbling my thoughts as I do.
     
  44. breese45

    breese45

    Joined:
    May 10, 2015
    Posts:
    10
    Miguel de Icaza said on a recent Reddit AMA:

    “. . . Second, while .NET and Mono are fabulous there are so many great ideas that we have in our backlog to improve the platform, that if anything, we need more time and people to join us.

    We want anyone that comes in contact with C# or F# to have a delightful experience.

    As for specifics of projects, we want to help Unity upgrade their .NET stack and support them all the way to do so.

    What Unity has done embedding C# into a game engine is brilliant, and we want to replicate this both across other game engines, but also to other applications. I want to make .NET the scripting language of choice for all developers.

    To assist developers in this goal, we have been working on a rich REPL/console that any .NET or Mono developer can add to their apps.

    So essentially, embed Mono or .NET in your app, and get a great scripting, prototyping, learning and interactive console for free:”

    Storms a comin' A storm of Awesomeness!
     
    Deleted User and angrypenguin like this.
  45. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    487
    Yes I do want.

    Tasks are not exactly about threading, they are about async operations. I'm using outdated port of TPL for Tasks as futures with no threads, just to wrap coroutines.
     
  46. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    487
    Realized I'd prefer Unity to be a little less cross-platform. So users don't have to pay for things they are not using. It's great that one can target Tizen, or Samsung Smart TV, or I don't know. But the rest of us, who are interested only in Android, iOS, UWP and desktop Windows, implicitly have to pay for these marginal platforms too.
     
  47. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    I don't know if that's the case. I'm pretty sure Unity wouldn't have added them in the first place if it wasn't going to bring in enough new customers to pay its own way. At least, that logic has been applied by Unity staffers before when people asked for support for a given platform.

    As for the rest... sure, I'd love it if Unity only supported the platforms that are relevant to my projects. But so would everyone else, and while there's certainly a few common ones I bet that a lot of developers have slightly different lists of which platforms they'd consider to be important.
     
    Ryiah and Kiwasi like this.
  48. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    487
    (Sorry, I don't know how to derive noun from adjective “cross-platform” correctly; so I'm going to introduce term “cross-platformness”.)

    I mean, that “cross-platformness” is used as excuse for not using mature Framework; because some platforms have no Mono support, so Unity needs to ~reinvent the wheel~ develop their own nonstandard toolchain. In this context “cross-platformness” actually sounds like disadvantage. And Xenko (mentioned above) has advantage over Unity being not that cross-platform: it targets only Android, iOS, mobile and desktop Windows, so allows just to use latest Xamarin or .NET 4.6 with async/await, etc. It does not require a lot of months of “porting Mono” to marginal platforms for developers; and users don't have to wait for years until runtime replacement is developed and polished.
     
  49. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,145
    One of Unity's primary advantages is that cross-platform support. Removal of that support would be counterproductive to the engine. Additionally in the long term this migration to IL2CPP may seem like a mistake but it will bring benefits that the framework alone cannot provide. There is simply a slight hiccup phase while everything is prepared for prime time.

    If it does a better job then why are you still here? Choose the engine that best suits your needs.

    There is nothing marginal about the consoles.
     
    Last edited: Apr 26, 2016
    kB11 and Kiwasi like this.
  50. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    This. Unreal supports less platforms. And by all accounts it's a good engine.

    Unity has managed to mop up every indie and mobile dev in the business, by virtue of being so cross platformy. I doubt they will abandon their key selling point anytime soon.
     
    kB11 and Ryiah like this.