Question by
Supphakon · Jul 28, 2020 at 12:19 PM ·
errorunity 2dnulldestroy objectdestroygameobject
The object of type 'GameObject' has been destroyed but you are still trying to access it.
Error
I found this error. How I fix It
Code destroy:
if (collision.gameObject.CompareTag("O"))
{
tutorial.t = true;
Debug.Log("3");
Destroy(collision.gameObject);
}
Code what I think makes this error:
if (Ball.active == true)
{
point.SetBool("entered", true);
point.SetBool("enter", true);
Time.timeScale = 1;
O.SetActive(true);
}
else if (Ball.active == false)
{
point.SetBool("enter", false);
O.transform.position = new Vector2(0, 6.11f);
O.SetActive(false);
}
Please tell me how I fix it.
Comment
Your answer
Follow this Question
Related Questions
Making objects with the same tag destroy eachother 1 Answer
Stuck in a while loop inside my inventory 2 Answers
assembly csharp error 0 Answers
can't add script behaviour TMP_SelectionCaret . The script need to derive from MonoBehaviour 4 Answers
Change trail rederer to it's default/original vaule. 0 Answers