start scene bug fix

This commit is contained in:
orsolya-st
2026-06-07 10:01:22 +02:00
parent 62b560b9f9
commit 538e5e8af2
3 changed files with 9 additions and 11 deletions
+4
View File
@@ -2,8 +2,12 @@ using UnityEngine;
public class FalldownScene : MonoBehaviour
{
public GameObject targetObject;
void Awake()
{
targetObject = GameObject.FindGameObjectWithTag("Player");
Destroy(targetObject);
// This tells Unity NOT to destroy this object when loading a new scene
DontDestroyOnLoad(gameObject);
}