Started work on merging the karate man events

This breaks enum dropdowns but I'll fix that tomorrow
This commit is contained in:
Carson Kompon
2022-03-01 03:17:06 -05:00
parent daf19fae54
commit 42b7d724be
4 changed files with 31 additions and 8 deletions

View File

@ -99,11 +99,11 @@ namespace RhythmHeavenMania.Editor
dropDownData.Add(optionData);
}
dropdown.AddOptions(dropDownData);
dropdown.value = ((int)Enum.Parse(objType, parameterManager.entity[propertyName].ToString()));
dropdown.value = Array.IndexOf(Enum.GetValues(objType), Enum.GetValues(objType).GetValue((int)parameterManager.entity[propertyName]));
dropdown.onValueChanged.AddListener(delegate
{
parameterManager.entity[propertyName] = Enum.ToObject(objType, dropdown.value);
parameterManager.entity[propertyName] = (int)Enum.GetValues(objType).GetValue(dropdown.value);
});
}
else if (objType == typeof(Color))

View File

@ -120,7 +120,7 @@ namespace RhythmHeavenMania.Editor
for (int i = 0; i < mg.actions.Count; i++)
{
if (mg.actions[i].actionName == "switchGame") continue;
if (mg.actions[i].actionName == "switchGame" || mg.actions[i].hidden) continue;
GameObject g = Instantiate(EventRef, eventsParent);
g.GetComponent<TMP_Text>().text = mg.actions[i].actionName;
g.SetActive(true);