starting work on a cleanup/rewrite

This commit is contained in:
Sinai
2021-03-16 18:12:39 +11:00
parent 9665753dc8
commit 9e996816ef
13 changed files with 147 additions and 95 deletions

View File

@ -35,7 +35,7 @@ namespace UnityExplorer.Inspectors.Reflection
else if (typeof(Enum).IsAssignableFrom(type))
{
// NET 3.5 doesn't have "GetCustomAttribute", gotta use the multiple version.
if (type.GetCustomAttributes(typeof(FlagsAttribute), true) is object[] fa && fa.Length > 0)
if (type.GetCustomAttributes(typeof(FlagsAttribute), true) is object[] fa && fa.Any())
return typeof(InteractiveFlags);
else
return typeof(InteractiveEnum);

View File

@ -96,11 +96,11 @@ namespace UnityExplorer.Inspectors
}
}
internal void OnSceneChange()
{
m_sceneDropdown.OnCancel(null);
RefreshSceneSelector();
}
//internal void OnSceneChange()
//{
// m_sceneDropdown.OnCancel(null);
// RefreshSceneSelector();
//}
private void RefreshSceneSelector()
{
@ -138,8 +138,11 @@ namespace UnityExplorer.Inspectors
if (anyChange)
{
m_sceneDropdown.OnCancel(null);
m_sceneDropdownText.text = newNames[0];
SetTargetScene(newScenes[0]);
SearchPage.Instance.OnSceneChange();
}
m_currentScenes = newScenes.ToArray();