Hi, I’ve exported a sketchup staircase as .fbx and imported it into Unity.
Now I want the staircase to appear whenever my fpc enters a trigger. I’ve written a script, but my staircase is always there, even when the trigger isn’t entered. I think it might be because I declared the variable as a GameObject. When I drag the script to my trigger and the fbx model to this GameObject variable, unity accepts it, but still the script doesn’t work. Maybe I should use another type than GameObject for fbx models? Here’s my script:
var Staircase: GameObject;
function Start()
{
Staircase.active = false;
}
function OnTriggerEnter (other: Collider)
{
Staircase.active= true;
}