problème : pas de moyen de sauvegarder et de charger les niveaux entamés solution : fonctions save et load dans le LevelManager
17 lines
338 B
C#
17 lines
338 B
C#
using UnityEngine;
|
|
|
|
public class SingletonSO<T> : ScriptableObject where T : SingletonSO<T>
|
|
{
|
|
private static T _instance;
|
|
public static T Instance
|
|
{
|
|
get
|
|
{
|
|
if (!_instance)
|
|
{
|
|
_instance = CreateInstance<T>();
|
|
}
|
|
return _instance;
|
|
}
|
|
}
|
|
} |