- Home /
unity crash when i change a variable affectation
hi This function below is ok but if I change the affected value in the if
poids = 15;
this isnt working, No exeption, nothing but unity not responding seems to be crash. nothing to do exept kill the process. Do you know why?
private static function calculerValeurHeuristique(node:Node, goal:Vector3):float {
var poids:float = 0;
if (Global.getInstance().isValidLocation(node.position) == false)
{
poids = 3;
}
poids += Vector3.Distance(node.position,goal) + 1;
return poids;
}
Comment
How can you have a Private Static Function? Don't they cancel each other out?
Nothing wrong with that at all. Static means it isn't per instance, private means it's only accessible from outside the class.
@$$anonymous$$ike: Private means it's only accessible from inside the class. :)
Answer by auger · Apr 10, 2011 at 04:41 PM
Ok I change a few things and it was probably just an infinit loop. My bad