Susan Harkins (398) [Avatar] Offline
#1
Please post errors found in the published version of Unity in Action, Second Edition here. If necessary, we'll publish a comprehensive list for everyone's convenience. Thanks!

Susan Harkins
Errata Editor
Manning Publications
MatanK (4) [Avatar] Offline
#2
In section 4.5.2, page 92, it says to drag the imported texture into the texture slot in unity. When I followed the instructions in my version of unity (2017.4.1f1) the material was disabled and I could not change the texture slot. After searching, I found the following video: https://www.youtube.com/watch?v=xOeodlLTx8g
Which shows the problem I had (at minute 4:05 of the video). Eventually, as explained in the video, this was fixed by going to the "materials" tab in the imported model and clicking "Extract Materials..."

Would be nice to add this to the errata so future people will have an easier time finding the solution to this smilie

Otherwise, super awesome book so far. Thank you!
jhocking (200) [Avatar] Offline
#3
Thanks! I'll double-check that issue; looks like this will be the first thing on the list of errata I'm compiling.

This must be a change from Unity 5 that I hadn't noticed, because these instructions worked fine before.
TokyoDan (3) [Avatar] Offline
#4
What version of Unity does this new 2nd Edition cover?
jhocking (200) [Avatar] Offline
#5
TokyoDan wrote:What version of Unity does this new 2nd Edition cover?


(fyi this thread is for reporting errors in the book; it would have been better to ask this in a new thread)

The version of Unity used in the book is 2017.1
MatanK (4) [Avatar] Offline
#6
Errata for Listing 6.8 (page 143):

"if (deltaX != 0)"

should be replaced by

"if (!Mathf.Approximately(deltaX, 0))"

I don't think it matters much in this case, but this is the way it was coded in Listing 6.2.
jhocking (200) [Avatar] Offline
#7
doh you're right, I'll have to mark that mistake in errata. Originally 6.2 was written the same way, but after this suggestion I changed that code and forgot to change 6.8 as well.
577389 (1) [Avatar] Offline
#8
Section 2.4.2 - Dead link to article on quaternions
Section 2.4.2 references Q47 of www.flipcode.com/documents/matrfaq.html. That link is a dead end, but one can get to the content via the Internet Archive http://web.archive.org/web/20171213210351/www.flipcode.com/documents/matrfaq.html.
jhocking (200) [Avatar] Offline
#9
Thanks, I'll probably find a different live article for that link.

EDIT: This one looks good https://www.gamasutra.com/view/feature/131686/rotating_objects_using_quaternions.php
MatanK (4) [Avatar] Offline
#10
Just found an error due to watching streamers playing my Ludum Dare game on twitch. It was glitched for some people, and after some debugging I finally found out it was due to a bug I got from page 132:

void Update() {
float deltaX = Input.GetAxis("Horizontal") * speed * Time.deltaTime;
Vector2 movement = new Vector2(deltaX, _body.velocity.y);
_body.velocity=movement

Apparently, you should not multiply velocity by deltaTime. This makes sense since distance = velocity * time, so you don't want time to be multiplied twice when calculating the distance...

(by the way, my jam entry is at https://ldjam.com/events/ludum-dare/42/pyramidion)
jhocking (200) [Avatar] Offline
#11
ah good spot. I had copied that line from the 3D movement code, and forgot about the difference between manipulating the position directly, and manipulating the velocity.
Susan Harkins (398) [Avatar] Offline
#12
An updated errata list for Unity in Action, Second Edition is available at https://manning-content.s3.amazonaws.com/download/a/f5a5e21-7743-43c7-88dd-0dcd9bf7cd2b/Hocking_UnityinActionSE_err2.html. Thank you for participation in this process!

Regards,
Susan Harkins
Errata Editor