public static IUiElement GetOrRegisterAndGetUiElement(this IRenderController renderController, string path)
        {
            var layer = renderController.GetUiElement(path) ??
                        renderController.RegisterUiElement(path, null, null);

            return(layer);
        }
        private static IUiElement GetCachedElement(IRenderController controller, string name)
        {
            if (!uiElementCache.ContainsKey(name) || uiElementCache[name] == null)
            {
                uiElementCache[name] = controller.GetUiElement(name);
            }

            return(uiElementCache[name]);
        }