Question by
andrestg · Sep 18, 2016 at 11:01 AM ·
gameobjects
clone a game object and use it
I am developing a game quiz in c# and I wanted to make that when the answer is correct it shows an image with that indicates correct as a approval. it is working in this way but in the next question when the answer is correct it doesnt works and unity shows a message like this " MissingReferenceException: The object of type 'GameObject' has been destroyed but you are still" I really apprecite your help
public void respuesta(string alternativa) { if (alternativa == "A") { if (alternativaA [idPregunta] == correctas [idPregunta]) { aciertos += 1; correctaA.SetActive (true); Destroy (correctaA , .6f);
}
else {
incorrectaA.SetActive (true);
Destroy (incorrectaA, .6f);
}
}
Comment