var Rd:GameObject;
function Update ()
{
if(!Rd==null){
Destroy(GetComponent(“LevelManager”));
}
}
it is not working guys :S how can fixed it
var Rd:GameObject;
function Update ()
{
if(!Rd==null){
Destroy(GetComponent(“LevelManager”));
}
}
it is not working guys :S how can fixed it
I assume you are trying to remove the component LevelManager from the GameObject Rd.
To do so, go like this:
var Rd : GameObject;
function Update () {
if(Rd!=null)
{
Destroy(Rd.GetComponent(LevelManager));
}
}