I've recently started exploring the world of Unity and the weirdest thing about it is that it's 90%/10% in favour of video tutorials - even for the purely code-based aspects. Even Unity's own official tutorials are all in video form.
A Software Engineer’s Guide to Unity and AR/VR Development – Part 1
11–20 of 36 posts
Re: A Software Engineer’s Guide to Unity and AR/VR Development – Part 1
#12I might go so far as to say it's the ActiveRecord to Unity-as-Rails for AR/VR, although the analogy is really flawed.
While I like your overall approach (a true, comprehensive intro to Unity), I would have liked to see more about, I guess I'd call it, the philosophy of putting code into Unity, covering (specifically and, IMHO, most importantly) the type of component system they're using, and type of event system they're using. The equivalent of describing a new language in terms of which features from the language grab-bag the authors decided to use.
PS - Pluuuuug, because dealing with JSON/YAML in C# suuuuucked: https://github.com/narfanator/maptionary
Re: A Software Engineer’s Guide to Unity and AR/VR Development – Part 1
#13Earlier quoted context omitted.
It's likely the highest ROI way to package it, relative to active effort, i.e. excluding time waiting for video encoding. You record a few minutes, narrate over it, and post it.
This is where I've found Lynda's tutorials great. They align the text to the video so you can see and read at the same time. I was able to get pretty far by reading Unity In Action though, which was purely just a book tutorial and I really enjoyed it. So I don't know, I would attribute it more to a younger audience who is more receptive of videos over written tutorials.
Is this really true? There's some inherent advantages to words and pictures vs video and audio that can't be hand-waved away as 'preferences' or 'learning styles'. Has an entire demographic really chosen a medium that nullifies such powerful techniques as skimming, copy/paste, seeking without laborious workarounds, variable speed of consumption etc.
Re: A Software Engineer’s Guide to Unity and AR/VR Development – Part 1
#141) Resource.Load and GameObject.Instantiate during a runtime loop. Both of these are very expensive and will generate a ton of garbage.
2) Constantly Instantiating and Destroying GameObjects during runtime. This will create a ton of garbage on top of the expense of the Instantiate. The solution to this should be an object pool (http://catlikecoding.com/unity/tutorials/object-pools/ ). Realistically this is probably outside of the scope of this blog post, but maybe the author should have avoided Instantiate in an introductory example.
3) GameObject.Find to locate a fixed game object in the scene. This should be replaced with an object reference (references can be connected in the editor), or if that doesn't work for whatever reason use Find once in Start or Awake and store a reference to the object are a member variable. Unity recommends to not use it every frame in it's documentation (https://docs.unity3d.com/ScriptReference/GameObject.Find.htm...)
4) Debug.Log can be useful in a pinch, but doing it in Update or other frequently called method can cause performance problems, also printf debugging has never been great. Visual Studio debugger support is really good in Unity, use that.
This code is ok if you don't care at all about performance, but in a VR or AR app you can quickly add milliseconds frame time and make yourself sick writing relatively simple code in this style.
Re: A Software Engineer’s Guide to Unity and AR/VR Development – Part 1
#15I hate to be that guy on HN but this article set me off as a Unity VR developer. I understand this is an introduction for people coming from a web development or other more traditional software engineering background, and the code is purely demonstrative, but it's full of Unity performance anti-patterns. Specifically... 1) Resource.Load and GameObject.Instantiate during a runtime loop. Both of these are very expensiv…
Re: A Software Engineer’s Guide to Unity and AR/VR Development – Part 1
#16I hate to be that guy on HN but this article set me off as a Unity VR developer. I understand this is an introduction for people coming from a web development or other more traditional software engineering background, and the code is purely demonstrative, but it's full of Unity performance anti-patterns. Specifically... 1) Resource.Load and GameObject.Instantiate during a runtime loop. Both of these are very expensiv…
Are these issues easily fixed by refactoring? As a newcomer to Unity, I'm ok writing poorly performing quick code to experiment, and properly implement the code at a later stage. I'm afraid that I may burn out too quickly if my first interaction with a platform is too much concerned with patterns.
Re: A Software Engineer’s Guide to Unity and AR/VR Development – Part 1
#17I hate to be that guy on HN but this article set me off as a Unity VR developer. I understand this is an introduction for people coming from a web development or other more traditional software engineering background, and the code is purely demonstrative, but it's full of Unity performance anti-patterns. Specifically... 1) Resource.Load and GameObject.Instantiate during a runtime loop. Both of these are very expensiv…
Re: A Software Engineer’s Guide to Unity and AR/VR Development – Part 1
#18VTRK ( https://github.com/thestonefox/VRTK ) will almost certainly make your life better. It's (well done) implementations of (most? all?) the core AR/VR interaction patterns that have been worked out so far. I might go so far as to say it's the ActiveRecord to Unity-as-Rails for AR/VR, although the analogy is really flawed. While I like your overall approach (a true, comprehensive intro to Unity), I would have liked…
Also: VRTK is awesome and JSON/YAML in C# is indeed terrible.
Re: A Software Engineer’s Guide to Unity and AR/VR Development – Part 1
#19Re: A Software Engineer’s Guide to Unity and AR/VR Development – Part 1
#20VTRK ( https://github.com/thestonefox/VRTK ) will almost certainly make your life better. It's (well done) implementations of (most? all?) the core AR/VR interaction patterns that have been worked out so far. I might go so far as to say it's the ActiveRecord to Unity-as-Rails for AR/VR, although the analogy is really flawed. While I like your overall approach (a true, comprehensive intro to Unity), I would have liked…
Yeah, I'm all for more discussions on philosophy instead of just the mechanics of doing X, Y, and Z. Like how does one augment existing physics to capture their game's possibly different/modified/caricatured definition of physics? Can one's games interactions come primarily from emergent behavior or does one need to do more leg work in the game model? Tons of discussion for later, hopefully! Also: VRTK is awesome and…