Answer the question
In order to leave comments, you need to log in
How to disable a GameObject script through another script?
It is clear (probably) that you need to make a reference to the object, but enabled does not accept GameObject, and SetActive disables only the object itself, the script remains working. What is the way out?
Answer the question
In order to leave comments, you need to log in
If you mean to disable the script from another object, then:
обьект.GetComponent<Название скрипта>().enable = false;
НазваниеПоля.enable = false;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question