Hello there.
No one is replying my threads recently :(, so lemme be quick:
OnBecameVisible is called even when a script is disabled, I’m using that to make the script ‘enable’ itself, so it goes through “Start” and also the “[×]Update” functions starts to be called every frame/tick.
I don’t know if that’s a feature or bug, because intuitively, nothing should run in a disabled script.
Any ideas if I can use that or is that a bug that will be fixed in the future?
Thanks in advance.
Thank you.
So, if I understand correctly, only Start(), Awake(), Update(), FixedUpdate(), and OnGUI() are affected by disabling the script, however, even for an ‘empty’ script the checkbox is showing in the editor, what’s not consistent with the manual, and also, LateUpdate() is not getting called in a disabled script I have…
I’m quite confused since I’m not getting what I’m seeing (on the manual
)… In any case I think it makes sense to call OnBecameVisible even when the script is disabled, so I’m going to rely on that for the moment.
The docs should have said LateUpdate (any Update-type functions are not called on a disabled script). Also, the thing about the checkbox in the editor only applies to C# scripts.
–Eric