Possible Mistake - Inconsistent Line

Hello,

I’m reading the Unity book… At the moment, 1 chapter per day.
I think I found a mistake in the page 126. It previews a line that will be added later in a lot of innested constructs. Where the book says to put it, it actually gives a compile error because it’s not declared (doesn’t look senseful either). Also I took a sight to final project and that line wasn’t there.

Here it is

Also the book doesn’t talk about this alienScript before like 7 pages

Hi r0gerblack,

I’m one of the authors of the book, and although this isn’t a chapter I helped write, I had a quick look and I my copy of the book is showing things slightly differently to your screenshot. Do you perhaps have an early access version of the book?

In my copy, I can see that a reference to the Alien script component is created in GameManager like this:

Alien alienScript = newAlien.GetComponent();

That would prevent the compiler errors you are seeing. Here is a screenshot of what I see…

I would suggest you login to your account and try download the book again, just to ensure you have the latest version. Your screenshot shows that your copy of the book is only 405 pages, and the full book release is just over 600 pages, so I assume you’ve got an older, pre-release version of the book, which might explain the error.

Hope that helps, and do let us know if it fixes your issue :]

Thanks!
Sean

Yeah this post was made when the book was still a preview (you can read by name v0.3.pdf), I reported the mistake as an attempt to get it removed from the final book. The mistake was also reported here.
I re-downloaded the book from the loot when final version came out, 3 days ago.

Hi r0gerblack,

Thanks for the heads up on this error. We went through the book before release and went through all the reported bugs and addressed them. This one was also fixed in the latest version so we appreciate your feedback.

If you need anything else, please feel free to reach out to me at any time.