This question is a bit confusing. What exactly did you assign to which Object?
If your script lives in a prefab maybe you assigned an object from your hierarchy as matchGUI? That won't work. You can only assign prefabs to prefabs in your assets.
I just purchased Will’s book and it is great; however, I, too, have come to a halt at this same point with the same error “The variable matchGUI of ‘PlayerCollisions’ has not been assigned”. I have followed the procedures exactly and checked and rechecked everything yet the error still appears… but only after pressing Play’ and grabbing the matches. Did anyone ever come up with a solution to this problem?,
Hey Dudes, was suffering from this problem for quite some time, God knows why… but when I created a prefab of an object that contained a variable that needed a assigning, it applied the same script “TWICE”
Select the object that has the script and scroll down the inspector, maybe you have two scripts!
StephanK’s answer above is correct. you have to select First Person Controller (which the PlayerCollisions script is attached to), drag MatchGUIprefab from Project panel and drop it over Match GUI variable of First Person Controller’s Player Collisions (Script) component on Inspector.