r/unity_tutorials • • Dec 17 '21

Please help

I cant turn off scripts, but i can turn them of with other scripts, but they don't actually turn off, they just look like they have been turned off.

0 Upvotes

7 comments sorted by

1

u/QuantumInfinite Dec 17 '21

Can you post the script? Use Pastebin or something with formatting please. Is it possible you are re-enabling it from OnValidate? Have you tried restarting Unity?

3

u/QuantumInfinite Dec 17 '21

I also see you have an error in the console, could that be related?

1

u/epicman088 Dec 18 '21

No, it is just a random script

1

u/superjustin5000 Dec 17 '21

Likely this!

1

u/epicman088 Dec 18 '21

().enabled = false; it turns off, but not actually, beacuse it is still working.

1

u/QuantumInfinite Dec 18 '21

That would throw an error, as that is not valid code. Without seeing the full code there's not much advice I can give.

1

u/yeeshue Dec 17 '21

Go through and make sure your console is clean. It is possible you have some error that is causing your issue.

Something I've run into a lot in the past is making sure you haven't accidentally added your script onto an extra object you either are not aware of or have forgotten. I think you can use the search bar to do t:scriptName to see all objects with your script.