Tuesday, December 11, 2012

Unity how to hide a single object

Here is what should do,

1. Open unity, create one object cube
2. Create new javascript then put


var mycube: Transform;

function update()
{

     mycube.transform.renderer.enabled=false;
}




3. drag this script into your cube object, 
4. drag the cube into your script variable "mycube"
5. if you run your app, the cube will be dissapear

No comments:

Post a Comment