Usually this works:
Any ideas? I've tried the GetComponent("SampleCode").enabled = false; method but it doesn't work either - it gives the error - BCE0019: 'enabled' is not a member of 'UnityEngine.Component'.
answered Mar 14 '10 at 08:47 AM
or use the newer generic version:
Then you'll be able to use:
answered Mar 14 '10 at 09:34 AM