21 lines
466 B
C#
21 lines
466 B
C#
using UnityEngine;
|
|
|
|
namespace EscapeRoomEngine.Engine.Runtime.UI
|
|
{
|
|
public abstract class PersistedUI<T> : MonoBehaviour
|
|
{
|
|
public string key;
|
|
public T defaultValue;
|
|
|
|
public T Value { get; protected set; }
|
|
|
|
protected virtual void Start()
|
|
{
|
|
Value = RetrieveValue();
|
|
DisplayValue();
|
|
}
|
|
|
|
protected abstract T RetrieveValue();
|
|
protected abstract void DisplayValue();
|
|
}
|
|
} |