static void OnGUI(UnityModManager.ModEntry modEntry)
        {
            try
            {
                if (!enabled)
                {
                    return;
                }
                if (Game.Instance.Player.ControllableCharacters == null)
                {
                    return;
                }
                foreach (UnitEntityData unitEntityData in Game.Instance.Player.ControllableCharacters)
                {
                    Settings.CharacterSettings characterSettings = settings.GetCharacterSettings(unitEntityData);
                    if (characterSettings == null)
                    {
                        characterSettings = new CharacterSettings();
                        characterSettings.characterName = unitEntityData.CharacterName;
                        settings.AddCharacterSettings(unitEntityData, characterSettings);
                    }
                    if (unitEntityData.Descriptor.IsPet)
                    {
                        GUILayout.BeginHorizontal();
                        GUILayout.Label(string.Format("{0}", unitEntityData.CharacterName), "box", GUILayout.Width(DefaultLabelWidth));
                        characterSettings.showOverrideSelection = GUILayout.Toggle(characterSettings.showOverrideSelection, "Show Override Selection", GUILayout.ExpandWidth(false));
                        GUILayout.EndHorizontal();
                        if (characterSettings.showOverrideSelection)
                        {
                            ChooseEquipmentOverride(unitEntityData, characterSettings);
                        }
                        continue;
                    }
                    GUILayout.BeginHorizontal();
                    GUILayout.Label(string.Format("{0}", unitEntityData.CharacterName), "box", GUILayout.Width(DefaultLabelWidth));
                    characterSettings.showClassSelection = GUILayout.Toggle(characterSettings.showClassSelection, "Select Outfit", GUILayout.ExpandWidth(false));
                    if (unitEntityData.Descriptor.Doll != null)
                    {
                        characterSettings.showDollSelection = GUILayout.Toggle(characterSettings.showDollSelection, "Select Doll", GUILayout.ExpandWidth(false));
                    }
                    else
                    {
                        characterSettings.showDollSelection = GUILayout.Toggle(characterSettings.showDollSelection, "Select Doll", GUILayout.ExpandWidth(false));
                    }
                    characterSettings.showEquipmentSelection = GUILayout.Toggle(characterSettings.showEquipmentSelection, "Select Equipment", GUILayout.ExpandWidth(false));
                    characterSettings.showOverrideSelection  = GUILayout.Toggle(characterSettings.showOverrideSelection, "Select Overrides", GUILayout.ExpandWidth(false));
#if (DEBUG)
                    characterSettings.showInfo = GUILayout.Toggle(characterSettings.showInfo, "Show Info", GUILayout.ExpandWidth(false));
#endif
                    GUILayout.EndHorizontal();
                    if (characterSettings.showClassSelection)
                    {
                        ChooseClassOutfit(characterSettings, unitEntityData);
                    }
                    if (unitEntityData.Descriptor.Doll != null && characterSettings.showDollSelection)
                    {
                        ChooseDoll(unitEntityData);
                    }
                    if (unitEntityData.Descriptor.Doll == null && characterSettings.showDollSelection)
                    {
                        ChooseCompanionColor(characterSettings, unitEntityData);
                    }
                    if (characterSettings.showEquipmentSelection)
                    {
                        ChooseEquipment(unitEntityData, characterSettings);
                    }
                    if (characterSettings.showOverrideSelection)
                    {
                        ChooseEquipmentOverride(unitEntityData, characterSettings);
                    }
#if (DEBUG)
                    if (characterSettings.showInfo)
                    {
                        InfoManager.ShowInfo(unitEntityData);
                    }
#endif
                }
                settings.rebuildCharacters = GUILayout.Toggle(settings.rebuildCharacters, "Rebuild character model on loadscreen (Fix visual gitches)");
            }
            catch (Exception e)
            {
                DebugLog(e.ToString() + " " + e.StackTrace);
            }
        }