- Home /
Question by
DiamondMC102 · Oct 12, 2017 at 04:11 PM ·
gamedisable2d platformermaincamera
How to disable script in MainCamera game object
How can I disable a script called camerafollow in the MainCamera gameobject.
Comment
Best Answer
Answer by pikachuk · Oct 12, 2017 at 04:13 PM
Camera.main.GetComponent<camerafollow>().enabled = false;
(only if the script is directly on the gamera gameobject, else use Camera.main.GetComponentInParent if it is on a parent object of the camera