Has anyone else come across this? A script that I disable with the code below disables for an instant, then doesn't stay disabled any longer (I know this by debugging).
I don't have it being enabled anywhere in my code and I can't figure out why it becomes enabled again. TerrainScript does have a Update function but I can't imagine that making a difference.
asked May 07 '10 at 01:31 AM
Jordan Miller 2
For debugging purposes, one thing I like to do is break down any multiple-step statements, and check that every step worked. For instance, you could do:
It's possible that something is breaking somewhere (maybe mispelling/typo), and it's not obvious.
Also - what do you mean by not disabled? I can't find the Answer again, but I remember Duck posting somewhere, that disabling a script only disables certain functions, like Update(), etc. Some things - specifically OnMouseUp(), for instance, stay enabled, and so the script will respond to mouse clicks.
Is that what's happening?
answered May 21 '10 at 02:38 PM
The only thing I could think of is that your code somewhere is in fact enabling it again, without you realizing it. Try putting the terrain and this script in a seperate scene, and see if it still happens.
answered May 07 '10 at 11:25 AM
Lucas Meijer 1 ♦♦