evershade/Assets/Scripts/Managers/GameManager.cs

18 lines
435 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GameManager : MonoBehaviour {
public static GameManager Instance { get; private set; }
public PlayerData playerData;
private void Awake() {
if (Instance == null) {
Instance = this;
DontDestroyOnLoad(gameObject);
} else {
Destroy(gameObject);
}
}
}