- Home /
Function not updating
Reading it over and over i can't see anything wrong with the script;
function Update(){
if(inVehicle == 1){
inside();
}
}
'inVehicle' is changed to 1 and i've checked in the inspector and yes 'inVehicle; changes, and stays at 1 fine but 'inside' is only called once and i want it to be called every frame when 'inVehicle' is 1... tis' driving me mad! thanks in advance!
maybe posting your code that modify 'inVehicle' be helpful to figure out your problem.
leaving it on could help others with the same or similar problem
Answer by oinkoinkflapflap · Jun 15, 2013 at 12:09 PM
just as i got the email about your comment i figured it out... there is a gameObject found by tag that is made in active and unity didn't like it it seems, when i made the object stay active the script worked fine... the two things didn't seem to have much relevance but the script was still looking for an in active tag... guess that was it... thanks anyway
Your answer
Follow this Question
Related Questions
summing up items price in runtime 1 Answer
Aiming with function "Update" not working 0 Answers
Update() doesnt call method or modify values 1 Answer
Update not being called 1 Answer