im looking to temporarily dissable one script on a gameobject from a diffrent script in a diffrent gameobject. how do i locate the script component from within the code?
Just use the name of the script/class you’re trying to grab. So like:
PlayerController playerScript = gameobjectThatHasIt.GetComponent<PlayerController>();
2 Likes
ooooooh thank you