Answer by PokeJoe
First thing I notice is this: if (night = true) Remember that = and == are not the same thing. You are assigning night every time you do this, not testing it.
View ArticleAnswer by PokeJoe
Generally what I do in this situation is, for each instance you need of the script, make a new empty game object and add one instance of that script. Then, instead of attaching the scripts directly to...
View ArticleAnswer by PokeJoe
http://docs.unity3d.com/ScriptReference/Physics.Raycast.html The third parameter of the Physics.Raycast() function is the distance, which should be given as a float. By the way, what you have is not an...
View ArticleAnswer by PokeJoe
In case any one comes along with this problem in the future, I figured it out. In the second parameter, I use `items[0].name`. In the case of most objects, this is fine because it contains the name of...
View ArticleAnswer by PokeJoe
First thing I notice is this: if (night = true) Remember that = and == are not the same thing. You are assigning night every time you do this, not testing it.
View ArticleAnswer by PokeJoe
Generally what I do in this situation is, for each instance you need of the script, make a new empty game object and add one instance of that script. Then, instead of attaching the scripts directly to...
View ArticleAnswer by PokeJoe
http://docs.unity3d.com/ScriptReference/Physics.Raycast.html The third parameter of the Physics.Raycast() function is the distance, which should be given as a float. By the way, what you have is not an...
View ArticleAnswer by PokeJoe
In case any one comes along with this problem in the future, I figured it out. In the second parameter, I use `items[0].name`. In the case of most objects, this is fine because it contains the name of...
View Article