Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJennifer Gerbl
8,772 PointsLateUpdate instead of Update-Method?
I did some research and looked through the Unity Scripting API and found this:
http://docs.unity3d.com/ScriptReference/MonoBehaviour.LateUpdate.html
It says that especially for follow cameras it's good to use the LateUpdate()-Method instead of the Update()-Method.
Is there a reason why we use Update() or it is just to make things not to complex for the start?
1 Answer
Nick Pettit
Treehouse TeacherHi Jennifer Gerbl,
You're correct, in this case it's likely better to use LateUpdate, and the reason I didn't is because it doesn't seem to make much of a visible difference in this particular project and I wanted to keep the explanation as simple as possible. The same is true for the new course Cameras in Unity.
Future courses will get into more best practices like this, as well as increasingly advanced techniques. However, Unity is so huge and complex that it's necessary to cover a lot of ground in these first few courses without "tripping over myself" with too much detailed explanation. I realize this seems like a simple addition, and it is, but there are many more like it and I have to draw the line somewhere, otherwise we'd never actually finish a game. :)