using UnityEngine; using System; using System.Collections.Generic; using Unity.VisualScripting; public class StateManager : MonoBehaviour { public static StateManager Instance { get; private set; } public int currentSceneIndex = 0; [SerializeField] public List BerryBushData = new List(); [SerializeField] public List TwigData = new List(); [SerializeField] public List NPCData = new List(); [SerializeField] public SaveablePlayer PlayerData; private void Awake() { if (Instance != null && Instance != this) { Destroy(gameObject); // Only one instance allowed return; } Instance = this; DontDestroyOnLoad(gameObject); // Persist through scenes } public void SaveGameState() { Debug.Log("Saving game state..."); } public void LoadGameState() { Debug.Log("Restoring game state"); } }