void RefreshSkinsList() { if (skinsDropdown != null) { availableSkins = SkinLoader.FindAllSkins(); skinsDropdown.localizedItems = new string[0]; skinsDropdown.AddItem("Vanilla (by Colossal Order)"); foreach (var skin in availableSkins) { skinsDropdown.AddItem(String.Format("{0} (by {1})", skin.name, skin.author)); } skinsDropdown.selectedIndex = 0; skinsDropdown.Invalidate(); } }
void Start() { SetCameraRectHelper.Initialize(); LoadConfig(); if (!Directory.Exists(overrideDirectory)) { try { Directory.CreateDirectory(overrideDirectory); } catch (Exception ex) { Debug.LogException(ex); } } InitializeInGamePanels(); availableSkins = SkinLoader.FindAllSkins(); if (!string.IsNullOrEmpty(config.selectedSkinPath) && config.applySkinOnStartup) { foreach (var metadata in availableSkins) { if (metadata.sapphirePath == config.selectedSkinPath) { currentSkin = Skin.FromXmlFile(Path.Combine(metadata.sapphirePath, "skin.xml"), false); needToApplyCurrentSkin = true; break; } } } CreateUI(); debugRenderer = gameObject.AddComponent <DebugRenderer>(); }