public static GAppManager Instance { get; private set; }
private void Awake()
{
if (Instance != null && Instance != this)
{
Destroy(this);
}
else
{
Instance = this;
}
}
public void SetElement(int index)
{
// do something
}
Jak odwołać się do singletona?
GAppManager.Instance.SetElement(12);