protected override void AfterInit()
        {
            HudMain.Init();
            RebindDialog.Init();
            RichHudDebug.Init();
            InitSettingsMenu();

            RegisterClientHandler();
            CheckClientQueue();

            if (MenuUtilities.CanAddElements)
            {
                MenuUtilities.AddMenuElements(GetModMenuButton());
            }
        }
                private TreeManager()
                {
                    HudMain.Init();

                    if (treeManager == null)
                    {
                        treeManager = this;
                    }
                    else
                    {
                        throw new Exception($"Only one instance of {GetType().Name} can exist at any given time.");
                    }

                    updateAccessors   = new List <HudUpdateAccessors>(200);
                    distMap           = new Dictionary <Func <Vector3D>, ushort>(50);
                    uniqueOriginFuncs = new HashSet <Func <Vector3D> >();
                    indexBuffer       = new List <ulong>(200);

                    depthTestActions      = new List <Action>(200);
                    depthTestActionBuffer = new List <Action>(200);

                    inputActions      = new List <Action>(200);
                    inputActionBuffer = new List <Action>(200);

                    drawActions      = new List <Action>(200);
                    drawActionBuffer = new List <Action>(200);

                    layoutActions = new List <Action <bool> >(200);

                    clients    = new List <TreeClient>();
                    mainClient = new TreeClient()
                    {
                        GetUpdateAccessors = instance._root.GetUpdateAccessors
                    };

                    drawTimer = new Stopwatch();
                    drawTimes = new long[tickResetInterval];

                    inputTimer = new Stopwatch();
                    inputTimes = new long[tickResetInterval];

                    treeTimer = new Stopwatch();
                    treeTimes = new long[tickResetInterval];
                }