I have a bullet prefab which i instantiate from my “maincharacterscript” script
with the “bulletscript” which i have put on my bullet prefab i do the following to get the variable from my “maincharacterscript” script
var aimspeed : Transform;
var otherscript_aimspeed : characterscript; // (in variables declarations)
otherscript_aimspeed=aimspeed.GetComponent(maincharacterscript); // (in update)
otherscript_aimspeed.aimspeed //then i call the variable
I havent forgot to move the transform object over to aimspeed in the inspector, thats ok
my problem is, it doesnt update the aimspeed value…
could this be because the prefab i assigned over in the inspector was a prefab of my character and not the one in the hierarchy? as i couldnt assign that…
Thanks for any help