private void RegisterContext(UiContext.Identifier id, UiContext context)
 {
     if (!_contexts.ContainsKey(id))
     {
         _contexts.Add(id, context);
     }
     else
     {
         Debug.LogWarning("Context" + id + "is trying to be registered again");
     }
 }
    public void ChangeContext(UiContext.Identifier contextToLoad, System.Action onExit = null)
    {
        if (_contexts.ContainsKey(contextToLoad))
        {
            if (_loadedContext != null)
            {
                _loadedContext.Dismiss();
            }

            _loadedContext        = _contexts[contextToLoad];
            _loadedContext.OnExit = onExit;
            _loadedContext.Present();
        }
        else
        {
            Debug.LogWarning("Trying to load context that does not exist : " + contextToLoad);
        }
    }