Could someone direct me to a post or tell me how I deactivate/activate objects Canons, Cross-hairs, Movement on different cameras.
Thanks…
Could someone direct me to a post or tell me how I deactivate/activate objects Canons, Cross-hairs, Movement on different cameras.
Thanks…
You want to deactivate a GameObject? This is how it is done:
gameObject.active = false;
or to disable specifically a camera:
camera.enabled = false;
Thanks… The problem I had was that the Script that was supposed to enable the object was on the object disabled by the Script… doh…
var Cam : Camera;
var Crosshair : GameObject;
function Update () {
if(Cam.enabled == true)
{
Crosshair.gameObject.active = true;
}
if(Cam.enabled == false)
{
Crosshair.gameObject.active = false;
}
}