{"id":3721,"date":"2015-09-16T20:51:33","date_gmt":"2015-09-16T19:51:33","guid":{"rendered":"http:\/\/t-machine.org\/?p=3721"},"modified":"2015-09-16T20:57:14","modified_gmt":"2015-09-16T19:57:14","slug":"unity-the-real-version-5-just-released-unity3d-5-2-fixes-many-severe-issues","status":"publish","type":"post","link":"http:\/\/new.t-machine.org\/index.php\/2015\/09\/16\/unity-the-real-version-5-just-released-unity3d-5-2-fixes-many-severe-issues\/","title":{"rendered":"Unity: the &#8220;real&#8221; version 5 just released (#Unity3d 5.2 fixes many severe issues!)"},"content":{"rendered":"<p>A new version of Unity is now out &#8211; <a href=\"https:\/\/unity3d.com\/unity\/whats-new\/unity-5.2\">https:\/\/unity3d.com\/unity\/whats-new\/unity-5.2<\/a> &#8211; and it&#8217;s a doozy.<\/p>\n<p>I don&#8217;t normally blog a blow-by-blow account, but this set is particularly interesting.<\/p>\n<p>It suggests the tech team has been focussed on fixing many &#8220;critical but un-sexy&#8221; problems. That is a noticeable change in direction from the past few years. Possibly this is a one-off to get Unity 5 working properly.<\/p>\n<p><strong>If you&#8217;re still using Unity 4.x, it is finally safe to move to Unity 5<\/strong>.<\/p>\n<p>Unity 5 is not a complete replacement for Unity 4 &#8211; there are still major featuers of 4.x that have been removed from Unity 5 and have no upgrade-path &#8211; but it&#8217;s finally production-ready (or very nearly). That &#8230; is big news!<\/p>\n<h1>Hilighted improvements \/ fixes \/ changes<\/h1>\n<p>Please note: there will be a lot of negative comments here; that is inevitable, considering most of the change-list is &#8220;things that were broken, or wrongly implemented, or poorly designed &#8211; and are now not&#8221;.<\/p>\n<p>To be clear: I&#8217;m pleased and excited by the overall shape of these changes.<\/p>\n<h2>Graphics: Added CullingGroup API, which allows you to specify a large set of bounding spheres that are integrated into the culling pipeline and subjected to frustum and occlusion culling<\/h2>\n<p>Unity has (amazingly) never had built-in culling accessible by developers, which is almost unheard-of in game-engines. This suggests we&#8217;re getting towards it (although spheres are only a first-approximation for culling, and I wonder how deep the interaction is with Unity&#8217;s pipeline here. I&#8217;d assumed we&#8217;d get access to something more like BSP)<\/p>\n<h2>Application.UnloadLevel. Unloading scenes is now possible while the game is running. References to lightmaps are cleared but you have to call Resources.UnloadUnusedAssets() to actually unload them.<\/h2>\n<p>Scenes in Unity are very much FUBAR as a concept &#8211; they were created by people who had very little understanding of computer-game design and development. Ideally, we&#8217;ll see Unity remove the whole &#8220;Scene&#8221; concept in a future major release, but in the meantime this is a significant step towards reducing their weaknesses, which is good to see.<\/p>\n<h2>Layout elements under a ScrollRect component may not work properly<\/h2>\n<p>No s***, Sherlock! Yeah, most people using Unity&#8217;s &#8220;new GUI&#8221; have found it&#8217;s fundamentally broken in a bunch of places. Good to see Unity working on this, and hilighting some of the issues &#8211; but really they need to create an entire webpage listing &#8220;the following parts are broken, don&#8217;t use them &#8211; or beware if you do&#8221;.<\/p>\n<p>Right now, you tend to waste hours, half-days at a time &#8230; re-discovering known bugs in Unity&#8217;s GUI.<\/p>\n<h2>Scene view picking in linear color space does not work for DX11 when MSAA is used (quality: fantastic)<\/h2>\n<p>If you&#8217;re on Windows and have the highest quality settings, this is lethal: Unity simply doesn&#8217;t work. But it&#8217;s coming in an emergency patch very soon.<\/p>\n<h2>Mecanim: Playable API.<\/h2>\n<p>If this does what I think it does, then it was essential back when Mecanim was released (3 years ago); glad to see it&#8217;s finally here.<\/p>\n<h2>between 5% and 30% lower CPU cost for rendering<\/h2>\n<p>That&#8217;s an enormous speed-up for an engine as old as Unity &#8211; this is big news. Reading between the lines, the speed up is partly a side-effect of them making it a bit more multi-threaded (which became normal for game engines many years ago).<\/p>\n<p>If we thought that was a lot, wait till you see:&#8230;<\/p>\n<h2>Particle rendering optimizations (especially for VR), with speed improvements varying from 15% to 50%<\/h2>\n<p>&#8230; 50% performance improvement! Wow. Name-checking VR here is probably the key item. We keep seeing VR&#8217;s extreme performance-requirements forcing engine-makers to up their game, and dig deep to find perf boosts. The &#8220;minimum&#8221; hardware reqs for basic VR rigs are very high even now, several years after Oculus Rift launched.<\/p>\n<h2>UI now uses multithreaded batching &#038; geometry generation backend<\/h2>\n<p>This was the minimum we expected from the &#8220;new GUI&#8221; when it launched in Unity 4.6 almost a year ago. This fix brings the GUI most of the way towards being &#8220;production ready&#8221; &#8230; ironically, 6 months after Unity changed their website to hide the existence of the &#8220;old (but works) GUI&#8221; and pretend it didn&#8217;t exist.<\/p>\n<h2>Added parameter QueryTriggerInteraction to all physics queries (raycast, spherecast, overlap) to allow any query to override whether or not the query should hit Triggers<\/h2>\n<p>This is patching a MAJOR design bug in core Unity that has plagued Unity for many years. I want to play with this some more, and see how much we can un-**** Unity&#8217;s ****ed ray-casting system using it.<\/p>\n<p>(I don&#8217;t believe any experienced game-developer would have accepted Unity&#8217;s original design here &#8211; it was clearly a terrible approach that would cause never-ending head-aches when making games. It mixed concepts that were very obviously unrelated and distinct)<\/p>\n<h2>Fixed Function shaders work on all platforms now (including consoles)<\/h2>\n<p>This one has been blogged about extensively by some of the graphics team, IIRC.<\/p>\n<p>In my experience, Unity&#8217;s shaders have been OK, with a few that were terrible (e.g. all the Mobile ones), but the framework which holds them has generally been excellent: it&#8217;s isolated us from the pain and suffering of GPU-specific shader bugs. This house-cleaning doesn&#8217;t make much (if any) difference to most of us, but apparently keeps Unity&#8217;s internal code clean in a way that will facilitate rapid changes and improvements going forwards.<\/p>\n<h2>2D Rect Mask<\/h2>\n<p>TL, DR: &#8220;we finally implemented masking properly in the new GUI&#8221;.<\/p>\n<p>See previous comments on the new GUI, and how it&#8217;s getting much closer to production-ready.<\/p>\n<h2>UI: Dropdown control<\/h2>\n<p>Yes, really &#8211; Unity has finally added the &#8220;dropdown&#8221;, which has been a global expectation in UI design for 20+ years (it was made compulsory in web-browsers back in the 1990&#8217;s).<\/p>\n<h2>Editor: Remove legacy Mac OS X corner window resize behaviour<\/h2>\n<p>Apple told devs to remove this &#8230; um &#8230; about 3 or 4 years ago? At first, it was broken (couldn&#8217;t resize windows), then it was annoying (Unity added optional resizing on all edges, but put an illegal resize-hot-corner in bottom right that broke all EditorWindow code, because they made it a private API).<\/p>\n<p>Working around that on Mac &#8230; forced you to mildly break things on Windows.<\/p>\n<p>TL, DR: custom editors (as found in many\/most of the best Asset Store plugins) will now be a little less-broken across the board.<\/p>\n<h2>Substance &#8230; All crashes and hangs at build time, level load\/change time, playmode entry\/exit should be gone<\/h2>\n<p>Yay! I&#8217;ve not been using Substance, but I&#8217;ve met several developers who&#8217;ll be breaking over the champagne over this, given how miserable they&#8217;ve been about crashes and hangs with this in the past.<\/p>\n<h2>CanvasRenderer now takes a Mesh instead of List this allows for the use of imported meshs as part of the UI<\/h2>\n<p>Without this feature, <strong>the new GUI was not usable in most non-trivial games<\/strong>. It&#8217;s hard to over-estimate the importance of this for declaring the new GUI production-ready.<\/p>\n<h2>Allow sprites to be dragged into scene view in 3d mode<\/h2>\n<p>Small but sweet. It&#8217;s a little thing, but makes a big difference to the frustration level of the user; in my experience, these things are often the real reason why you sacrifice the cost-savings and benefits of your own engine and use something like Unity instead.<\/p>\n<p>i.e.: with your own engine, you can&#8217;t afford the time\/money to polish every small interaction; 3rd-party game-engines can shine here, and should take more advantage of it.<\/p>\n<blockquote><p>\nI sometimes mention stuff like this as suggesting that Unity&#8217;s senior management team are out-of-touch with their product. Unity&#8217;s early community loved it largely because of small things, but as Unity grew, the company stopped sweating them. I suspect time will eventually tell that was a huge strategic mistake.\n<\/p><\/blockquote>\n<h2>Improved Export Package window (now uses a proper tree view)<\/h2>\n<p>This window <strong>hasn&#8217;t correctly worked for at least three years<\/strong>; converting it to a &#8220;proper tree view&#8221; might &#8211; finally! &#8211; make the &#8220;Export Package&#8221; function do what it&#8217;s defined to, instead of exporting the wrong things, breaking keyboard and mouse interactions, etc.<\/p>\n<p>(most of the bugs appeared to be a side-effect of the non-maintained, half-implemented, custom tree view code)<\/p>\n<h2>Make sure ObjectField and Object Selector shows icons for game objects and prefabs<\/h2>\n<p>Co-incidentally, I tweeted about this recently: Unity could make their engine noticeably faster to develop with if they provided visual feedback on these fields.<\/p>\n<p>It&#8217;s embarassing, almost shameful, how poor the UX is on these fields today. By the sounds of things, this patch merely makes them &#8220;less crap&#8221;, rather than fixing them &#8211; but the last 5 years has been so awful that any improvement is welcome!<\/p>\n<h2>Selection.selectionChange callback triggered when selection changes<\/h2>\n<p>To call this <strong>&#8220;important&#8221;<\/strong> is somewhat of an understatement.<\/p>\n<p>Substantial areas of the Editor API&#8217;s are surprisingly poorly maintained by Unity. The bugs undermine people each time they try to use one of Unity&#8217;s overwhelmingly greatest features: its extensibility.<\/p>\n<h2>Graphics: Added a quality setting &#8216;Shadow near plane offset&#8217; to allow working around shadow pancaking artifacts<\/h2>\n<p>If this does what I suspect, it will make it trivial to fix a lot of common, frustrating &#8220;why do my shadows suck? OMG! UNITY SUXXS!!!!&#8221; situations.<\/p>\n<h2>Mecanim Improvements<\/h2>\n<p>SO MANY.<\/p>\n<p>I don&#8217;t use Mecanim: it&#8217;s been slow, clunky, buggy &#8211; and it solved the wrong problems at launch. It felt more like a marketing excuse rather than a developer feature. For me, working x-platform and often on mobile: not very useful.<\/p>\n<p>However, looking at how long the list of fixes is &#8230; it might finally be worth using it. In context of all the other changes we&#8217;re seeing &#8211; maybe production-ready for general use now?<\/p>\n<p>(modulo: the performance. Last time I checked, it was still way too slow for cross-platform games unless you were happy to have a relatively small number of animated objects)<\/p>\n<p>Go check it out! If you&#8217;re a long-time Mecanim user, let us know what you think of this list of changes!<\/p>\n<h2>Now a TerrainData object embedded into a scene (created by script) allows scene objects being selected as tree prefabs<\/h2>\n<p>Unity&#8217;s Terrain system was implemented using a nasty, ugly hack that should never have been used.<\/p>\n<p>As I understand it, that was in itself an attempt to workaround some problems with <strong>the fundamentally broken &#8211; and allegedly &#8220;unfixable&#8221; &#8211; Serialization system that is core to Unity<\/strong>, but is too much code for anyone to fix (and will be thrown out \/ fixed \/ replaced around Unity v6 or v7. Maybe).<\/p>\n<p>This change reeks of a &#8220;workaround to a workaround&#8221;: you can&#8217;t create TerrainData in the scene (which should be the ONLY option!), but you can artifically create one if you write a script to do it for you. Either way, it&#8217;s good news &#8211; TerrainData Assets are a common source of project-corruption, because they&#8217;re abusing a feature that wasn&#8217;t intended for this.<\/p>\n<h1>Stacktrace logging: Allow to log full (native\/managed) stack trace when log is printed, the option is available in the console window in top right corner popup menu. <\/h1>\n<p><strong><em>OMGWTFBBQ!!!!!!!!!!!111!11111!!!!11!!!1!<\/em><\/strong><\/p>\n<p>I frequently discover major bugs in Unity core; there is never anything I can do about it because Unity strips \/ deletes all stack traces (in most cases) before outputting anything.<\/p>\n<p>If this fix does what it says on the tin &#8230; WOOOHHHOOOO! &#8230; we can finally workaround Unity crashes (by debugging them!) and give Unity much more detailed and accurate bug-reports (leading to greatly increased chances of them fixing bugs).<\/p>\n<p>Cross those fingers&#8230;<\/p>\n<h2>Fix Cursor<\/h2>\n<p>As I recently tweeted, Unity&#8217;s support for custom mouse-cursors was recently broken. That&#8217;s a huge pain given most games today use custom cursors. Several fixes here, looks like they&#8217;ve cleaned them all up (I hope).<\/p>\n<h2>Fix possible data loss on Windows when renaming folder with locked files<\/h2>\n<p>:O<\/p>\n<h2>Fix occasional recycle bin bypassing when deleting assets on Windows<\/h2>\n<p>:O<\/p>\n<h2>Serialization: Fixed not being able to serialize a field called &#8220;Base&#8221;<\/h2>\n<p>:O<\/p>\n<h2>UI: Stop disabled graphics from blocking raycasts<\/h2>\n<p>If this is what I think it is, it&#8217;s another example of &#8220;should have been fixed before 5.0 was released&#8221; &#8211; but I&#8217;ve had so many problems with the bad system of Unity raycasts that I go out of my way to avoid them anyway.<\/p>\n<h1>Core: Fixed hang when passing large arrays to the Undo system<\/h1>\n<p>Sounds unexciting, but &#8230; I think I&#8217;ve encountered this on some of my projects: unexplained hangs that came out of nowhere and destroyed my ability to keep working on one particular game, related to Undo.<\/p>\n<p>Note: I keep saying this in public: <strong>Unity&#8217;s Undo system simply Does Not Work<\/strong>, it&#8217;s appallingly buggy. As far as I can tell, the person who originally wrote it had little or no experience of what they were doing, and didn&#8217;t consult the literature to find out how to implement Undo systems correctly.<\/p>\n<p>Some days, I genuinely feel it would be better for everyone if Unity removed the &#8220;ctrl-z&#8221; keyboard combo, because so often when you press those letters you corrupt your game project. A lot of the time, you don&#8217;t notice that Unity has just corrupted your project &#8211; not until much later, and then you don&#8217;t realise that it was Unity&#8217;s broken Undo that caused the corruption. Instead, you blame yourself, or your co-workers. Seriously, it&#8217;s that bad.<\/p>\n<p>(I&#8217;ve stopped bothering logging bugs against it)<\/p>\n<h2>Importing: Changes to scripts are now correctly processed synchronously, fixing a range of issues with scripts relating to asset processing at import time<\/h2>\n<p>Subtle, but &#8230; I suspect this fixes a LOT of bugs we see on larger Unity projects, where you&#8217;re frequently hot-loading complex sets of scripts, assets, inter-related dependencies, custom asset-processors, etc.<\/p>\n<h1>&#8230;the end<\/h1>\n<p>So that&#8217;s it. What do you think? Any other major items you notice in the release notes that will make your life significantly better?<\/p>\n<p>What&#8217;s still broken?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A new version of Unity is now out &#8211; https:\/\/unity3d.com\/unity\/whats-new\/unity-5.2 &#8211; and it&#8217;s a doozy. I don&#8217;t normally blog a blow-by-blow account, but this set is particularly interesting. It suggests the tech team has been focussed on fixing many &#8220;critical but un-sexy&#8221; problems. That is a noticeable change in direction from the past few years. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[67],"tags":[],"_links":{"self":[{"href":"http:\/\/new.t-machine.org\/index.php\/wp-json\/wp\/v2\/posts\/3721"}],"collection":[{"href":"http:\/\/new.t-machine.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/new.t-machine.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/new.t-machine.org\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/new.t-machine.org\/index.php\/wp-json\/wp\/v2\/comments?post=3721"}],"version-history":[{"count":4,"href":"http:\/\/new.t-machine.org\/index.php\/wp-json\/wp\/v2\/posts\/3721\/revisions"}],"predecessor-version":[{"id":3725,"href":"http:\/\/new.t-machine.org\/index.php\/wp-json\/wp\/v2\/posts\/3721\/revisions\/3725"}],"wp:attachment":[{"href":"http:\/\/new.t-machine.org\/index.php\/wp-json\/wp\/v2\/media?parent=3721"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/new.t-machine.org\/index.php\/wp-json\/wp\/v2\/categories?post=3721"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/new.t-machine.org\/index.php\/wp-json\/wp\/v2\/tags?post=3721"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}