美文网首页unity
2019-05-27 InvokeRepeating and c

2019-05-27 InvokeRepeating and c

作者: voif | 来源:发表于2019-05-27 16:58 被阅读0次

gameobject not active或者component not enable的时候,InvokeRepeating和coroutine是否会停止

InvokeRepeating

  1. gameobject.setActive(false) - InvokeRepeating 不停

  2. component.enable = false - InvokeRepeating 不停

Coroutines

  1. gameobject.setActive(false) - coroutine 停

  2. component.enable = false - coroutine 不停

这些情况下,停了即使重新active或者enable也不会自动重启

相关文章

网友评论

    本文标题:2019-05-27 InvokeRepeating and c

    本文链接:https://www.haomeiwen.com/subject/kuahtctx.html