Hi I’m making a maze game where you find broken objects and have to find the parts to fix them i have a problem with a script that i am using for a hover function because when you find the broken object you can use the mouse to find out what pieces are missing i am using the set active function for this instead of the renderer this is the code
var CDDrive : GameObject;
var hoveractive:boolean = true;
static var place:boolean = false;
function OnMouseOver () {
if(hoveractive == true) {
CDDrive.SetActive(true);
}
}
function OnMouseExit () {
if(hoveractive == true) {
CDDrive.SetActive(false);
}
}
function OnMouseDown() {
if(place == true) {
hoveractive = false;
CDDrive.SetActive(true);
}
}
this has worked for other levels accept this one
i have attached the scripts i have attached a box collider on the objects and i have turned them off within the inspector and also the game objects have been dragged and dropped into the inspector as well
any help would be much appreciated