public void ReDeletePlatforms(InputAction.CallbackContext context)
{
Debug.Log("Нажал");
StopCoroutine(platformsCreate.Spawning());
Debug.Log("Остановил корутину");
destroyPlatforms2 = GameObject.FindGameObjectsWithTag("Platform");
for (int i3 = 0; i3 < destroyPlatforms2.Length; i3++)
{
//Thread.Sleep(1000);
Instantiate(destroyPlatforms2[i3], destroyPlatforms2[i3].transform.position, Quaternion.identity);
destroyPlatforms2[i3].gameObject.tag = "PlatfomRealy";
BoxCollider2D boxCollider2D;
boxCollider2D = destroyPlatforms2[i3].GetComponent<BoxCollider2D>();
boxCollider2D.isTrigger = false;
Destroy(destroyPlatforms2[i3]);
}
StartCoroutine(platformsCreate.Spawning());
}
Вот что происходит при нажатии правой кнопкой мыши