Ok I have two scripts on the main player gameObject. One I am going to use for teleporting (FollowPath script) and the other is for locomotion (Controller script). So when I teleport I dont want the Controller script to be active. So I want to have the FollowPath script dissable the Controller script. I have tried 100 variations of the following:
Component myComponent = GetComponent("Controller");
myComponent.active = false;
But I keep getting this error:
`UnityEngine.Component.active’ is obsolete
if I try
myComponent.enabled = false
I get UnityEngine.Component' does not contain a definition for enabled’
I dont want to turn off the whole thing, just the script.
