InvokeRepeating Still Runs After Disabling!? | Unity Game Dev Tip ๐ฅ || Learn Unity #unitytips
Channel:
Subscribers:
1,430
Published on ● Video Link: https://www.youtube.com/watch?v=hQlmtCfXipA
Did you know? In Unity, disabling a GameObject or its script won't stop InvokeRepeating()! ๐ฑ
Many developers assume turning off a GameObject halts everything โ but thatโs not the case.
๐ In this short, I show how InvokeRepeating() keeps calling methods even after the GameObject is disabled โ and how to fix it using CancelInvoke() in OnDisable().