|
hi all, I want to know that is it possible to call update from another function??? If it is possible means how can i pass values as arguments into update....i have tried that but it shows "Update can not take arguments"... I want to know alternative way for this?? Can any one suggest your answer... Thanks in advance.
(comments are locked)
|
|
Here is an example: Script B accesses 2 variables in Script A and changes them and Update function in A is endlessly executing the function with changed arguments. ScriptA
ScriptB hi kourosh, function Update() { Check(id); } function OnMouseDown() { Continue(a); } function Continue(int a) { Do Something here... Update(); } function Check(int id) { Do Something Here... } is it possible???
Dec 13 '10 at 11:25 AM
sriram90
Do this instead:
Dec 14 '10 at 04:37 PM
anomalous_underdog
(comments are locked)
|
|
Put the code you have in Update into a new function. That new function can have arguments in it. Then replace the code in Update to simply just calling that function. I couldn't agree more. Don't fiddle with the base flow. Just reroute it to a branch instead.
Dec 13 '10 at 11:27 AM
Proclyon
(comments are locked)
|
