Question by
Veerababu.g · Oct 19, 2015 at 04:24 AM ·
invokerepeating
how can i increese the repete rate in invoke repeting after some time
IN my project am instantiating a sphere at initial stage with the repeat rate is 3f.after some i need to increase the speed instantiate no. what am doing is am decreasing the repeat rate after some time. Now what is the problem is the value is being initiated but there is no change. when i debug it it shows u can't initiate repeat rate in run time.
note: am placing invoke-repeating in start function.
Comment
Answer by hexagonius · Oct 19, 2015 at 08:27 AM
you cannot alter the rate of the already running InvokeRepeating. Do one of the following:
stop it and start a new one
don't use it and use Update with timer instead
create a coroutine with WaitForSeconds in a while loop (at least I think you can alter the variable used for WaitForSeconds)
Your answer