- Home /
HELP! is this a Bug in the game engine?
The script says I need to assign the variable when i already assigned it in the script AND the inspector!!! (I think it may be a bug)
/UnassignedReferenceException: The variable col of 'beyblade spin' has not been assigned. You probably need to assign the col variable of the beyblade spin script in the inspector. beyblade spin.Update () (at Assets/game2/beyblade spin.js:30) ///this is the error
var col:Collider;
function Update(){
if(col.gameObject.tag=="tag super duper")
{
print("hi");
}
}
Answer by Winterblood · Jan 03, 2012 at 10:50 PM
First, your question title should summarize the problem, so other users can see at a glance what you're having trouble with.
Are you sure that ALL gameobjects that use this script have something assigned to col? You may be looking at one correctly set up instance of the script, but the error is caused by a different one.
Your answer
Follow this Question
Related Questions
UnassignedReferenceException when its already assigned 1 Answer
Error: an exposed variable in a JavaScript is not a member of that script 1 Answer
Hierarchy not showing anything, getting KeyNotFoundException 1 Answer
Assign prefab to variable through script 1 Answer
Creating a 'rotation' system 1 Answer