Thanks again for the reply. VeronicaG , Mar 4, Chapter 6 Issue I created the Launcher and the components that show up are Transform, Audio Source, and Coconut Throw Script I can set the throw sound and the throw force easily, but the Coconut Object selection shows nothing, as in I can;t select the coconut prefab.
I went through the coconut making process again and still can't manage to select on the Launcher Any one else run into this or know how to solve it? Joined: Jan 31, Posts: I am trying to complete Chapter Four in the book but I am having a problem.
The door will open with sound, but when it goes to shut all I hear is the sound but the door remains open. I am a newbie to scripting and cannot seem to figure out what the problem is. It is probably something so simple that I will never notice or just overlook completely. I appreciate everyone on these boards for all your help and patience. My script is posted below. Code csharp :. Door doorShutSound, false , "doorshut" , currentDoor ;.
Door doorOpenSound, true , "dooropen" , currentDoor ;. Jessw14 , Mar 7, Never mind I figured it out! It was so simple and stupid at the same time. I just forgot to set the doorshut animation in the inspector panel. Joined: Apr 4, Posts: 1. I'm also having an error in chapter 6 when I instantiate the coconut. The error is: InvalidCastException: Cannot cast from source type to destination type.
Just like VeronicaG, the line that causes the error is: Code csharp :. Hi willGoldstone, On page of chapter 4,. Joined: Apr 6, Posts: Door doorShutSound, true , "doorshut" , currentDoor ;. For current version v2. What is that error message, alzan12? Could you post it here too? Raycast transform. Find "Battery GUI". Door doorOpenSound, true, "dooropen", currentDoor ;. PlayOneShot batteryCollect ;. Destroy collisionInfo.
Door doorShutSound, false , "doorshut" ,currentDoor ;. Joined: Mar 21, Posts: 5, I haven't been following the discussion but I wanted to mention that I did buy the Essentials book and enjoyed it a lot.
Took me a few days to get through it but the experience was worthwhile. The skills learned are more important than the end product, of course, so that you can transfer to starting to make your own games and creations, and I would certainly recommend this book to anyone who hasn't bought it yet.
Even though I had read through much of the online material and did the 2d platformer tutorial I still learned a lot of new stuff in this book. It seems now that Unity needs a book for advanced use which goes beyond this book and covers things like shaders, animation, modelling, more advanced physics etc. Perhaps we'll see that someday. Joined: Apr 28, Posts: Has anyone finally found the problem with the outpost door not closing fully?
I tried it again recently with 2. Sometimes it closes fully but mostly there is a gap after it closes. And sometimes the gap is huge. See images. Appears to be some sort of timing issue. Both images are after calling the ShutDoor function.
OpenDoor works fine. Find "outpost" ; myOutpost. Joined: Dec 16, Posts: I've got a question on a semi-related topic. I just got the book a week ago and are working through the tuts. In the book we assign dooropen and doorshut in the animations and add a frame difference to them.
The book doesn't explain what adding the frames does nor does it explain how adding doorshut produces an animation. Is doorshut a set animation within inherent to Unity that it knows what to do? What dictates the door's movement? It would seem to me I'd have to set up an animation 3dsmax style and apply that as the animation for doorshut but somehow it already knows what to do. What am I missing? By now many folks are aware of the fact that Will Goldstone has written a book about Unity, it's called Unity Game Development Essentials and it's being published by Packt Publishing.
While it was extremely exciting to know that a book was in the works, then available in electronic form, I have to admit that the best moment of all came today when a brown box was delivered to my desk for me to open. I'm the guy that handles incoming mail and packages sent to the San Francisco office so it wasn't unusual for me to have a "present" to open today. When I cracked open the box I found a nice surprise inside, the three copies of Will's book I'd long ago ordered had finally arrived!
So for those that don't know about it, consider this your heads up to check it out! Door doorCloseSound, false , "doorshut" ;. PlayOneShot doorOpenSound ;. Find "outpost" ;. Play "dooropen" ;. PlayOneShot doorCloseSound ;. Play "doorshut" ;. PlayOneShot aClip ;. Play animName ;. Thanks Dan, well have a question, is all script starting with using UnityEngine; are in C.
Dan Mills , Aug 27, That said, I was wondering if someone could post the full javascript coding for the Player Collisions script. I'm having difficulty following Will's explanations sometimes. I've got an "error" popping up at the bottom of the screen and I can't seem to see what my problem is I'm at the point where I'm trying to make the battery GUI appear when you reach the door while not having enough batteries and then have the GUI disappear once you've gotten all batteries and entered through the door once Chapter 5.
The error at the bottom of the screen says: "NullReferenceException: Object reference not set to an instance of an object" here is my coding for this section: Code csharp :.
Find "Battery GUI". Door doorShutSound, false , "doorshut" ;. Door doorOpenSound, true, "dooropen" ;. PlayOneShot batteryCollect ;. Destroy collisionInfo. Rainville , Aug 28, Joined: Mar 31, Posts: Rainville, I love Ontario. RuntimeServices Here is your problem. Create a java script then copy your script in it, anyway JS have a better debugger right now. Verify all your scripts are in JS, if no change them, the book is all JS. Rainville , Aug 29, Joined: May 26, Posts: I second posting the scripts.
Hi all, just checking book related threads to bring you news that my book on Unity is finally finished, and is heading to the printers this week, designed for beginners to get them kickstarted you can find out about it here.. Well in that case here's my errata, which I had sent you some time ago. Pitty that none? Also when you say "the location at which these vertexes meet are known as Points" I find the lines "Polygon triangles Every surface has a normal and when this normalvector is pointing towards the viewer that means the angle between the viewing vector and normal vector is less than 90 degrees the surface is pointing to you and so it's visible and should not be culled.
Tags can be used on many instances in Unity and an instance name is or should be unique. You should say it's on the origin of the parent. But on page 81 you use FixedUpdate to apply gravity, which I think is the correct way to do it. On page when calling the Rotate function you don't use new.
So that's confusing for the reader. For example in a function Sum i: int;j:int I certaintly won't say i and j are behaviours. It's just one model: campfire right? Now it looks like the battery is at 0. Also I could not understand World Velocity vs Local Velocity page , Simulate in Worldspace, difference between force and tangent velocity because they both give a boost.
I guess you could write a book alone on the subject of particles Could not understand from what I read what you mean by " It should be: if Time. You only mention it in page 70 but I can't find where you adjusted it?! Hi Jan well actually we did go over all of your errata, and hopefully corrected where appropriate, how exactly are you able to tell what is in the final book which has not yet been printed or made available in PDF form?
Jan The PDF version of the book will be updated with the last set of changes when the book is published later this week I'm told by the publisher. The technical editors and I read over yours and all other readers errata and between us we should have corrected what you have sent, please wait and be sure before assumed we have ignored you, I appreciate your help. Joined: Sep 25, Posts: Joined: Oct 5, Posts: 4.
Kind Regards, Oliver. Joined: Mar 30, Posts: RHD , Oct 7, Actually if you go to your drive and look in the assets folder for the project the scripts are in there. Merries , Oct 7, Hi guys, we have sample scripts in the assets bundle you download from Packt you know Hi Will, You do, but, and maybe I need to look harder, I could only find the finished scripts with all the various things in for battery collection and so on and this makes it hard for the beginner to tease out the specific functions for the earlier lessons.
0コメント