iOS deactivating a script deactivates the gameobject

i have just finished an interactive app but built it for web player and i am now converting it to an iOS build.
when you click on an object a script attached to the main camera needs to be deactivated but instead of doing this it deactivates the camera. here is the code

Camera.main.GetComponent("RotateCamera").active = false;

how do i convert this to work on iOS?

This is happening because "active" is a GameObject variable, not a property for the script only.

Here check this out:

You will probably need to wrap your script around a boolean and set it true/false instead of activating/deactivating the GameObject. Or you can try "enabled" property.... might work too.