может кто-нибудь помочь?
Код: Выделить всё
public bool startGame = false;
void Update()
{
if (startGame == true)
{
SpawnKonyaku();
startGame = false;
}
}
< /code>
levelrestart.cs
void OnTriggerEnter2D(Collider2D col)
{
if (col.gameObject.tag == "Player")
{
levelManager.startGame = false; //
Подробнее здесь: [url]https://stackoverflow.com/questions/54409308/access-public-bool-from-another-script-in-unity[/url]