Beispiel #1
0
        private IEnumerator WaitForUixPrefabsAndRegister()
        {
            while (ExpansionKitApi.GetUiExpansionKitBundleContents() == null)
            {
                yield return(null);
            }

            ourIsExpanded = !ExpansionKitSettings.IsCategoriesStartCollapsed();

            var prefabs = CustomParticleSettingsUiHandler.UixBundle = ExpansionKitApi.GetUiExpansionKitBundleContents();

            var rootPrefab = Object.Instantiate(prefabs.SettingsCategory, prefabs.StoredThingsParent.transform, false);

            rootPrefab.GetComponentInChildren <TMP_Text>().text = MelonPreferences.GetCategory(SettingsCategory).DisplayName;
            rootPrefab.SetActive(true);
            rootPrefab.AddComponent <CustomParticleSettingsUiHandler>();

            ExpansionKitApi.RegisterCustomSettingsCategory(SettingsCategory, rootPrefab);
        }