make a GUI control exclusive

in a project for iOS, i have a script which lets the user rotate, scale and translate objects in the scene. There’s also a GUI script with a slider which controls some property of that object. What would be an elegant way to temporarily override the cam script while the slider is being manipulated by the user?

I don’t think there is anything you can do that is particularly elegant, you just need to have some kind of public mode variable in the GUI and have the cam script honour the semantics of that mode:

MyGUI:

var isOpen = false;
... set when dialog is open ...

cam:

function Update()
{
    if (MyGUI.isOpen) return;

It’s not really any more or less elegant to do the reverse (have MyGUI set an enabled variable in cam).