- Home /
Best Answer
Answer by numberkruncher · Jan 17, 2014 at 06:12 AM
MonoBehaviour.enabled
should do the trick: http://docs.unity3d.com/Documentation/ScriptReference/Behaviour-enabled.html
Usage Example:
public class YourScript : MonoBehaviour {
private void SomeOtherScript otherScript;
private void Update() {
// Enable some other script!
if (otherScript != null)
otherScript.enabled = true;
// Disable myself!
enabled = false;
}
}