mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2025-06-24 01:12:41 +08:00
A few important fixes
* Reflection on Il2CppSystem-namespace instances has been fixed * Type/Value Syntax highlighting generalized and improved globally * Scene changes now refresh the scene-picker dropdown * probably other minor stuff too
This commit is contained in:
@ -62,7 +62,7 @@ namespace UnityExplorer.Inspectors
|
||||
|
||||
public void Init()
|
||||
{
|
||||
RefreshActiveScenes();
|
||||
RefreshSceneSelector();
|
||||
}
|
||||
|
||||
public void Update()
|
||||
@ -72,7 +72,7 @@ namespace UnityExplorer.Inspectors
|
||||
return;
|
||||
}
|
||||
|
||||
RefreshActiveScenes();
|
||||
RefreshSceneSelector();
|
||||
|
||||
if (!m_selectedSceneObject)
|
||||
{
|
||||
@ -104,10 +104,10 @@ namespace UnityExplorer.Inspectors
|
||||
internal void OnSceneChange()
|
||||
{
|
||||
m_sceneDropdown.OnCancel(null);
|
||||
RefreshActiveScenes();
|
||||
RefreshSceneSelector();
|
||||
}
|
||||
|
||||
private void RefreshActiveScenes()
|
||||
private void RefreshSceneSelector()
|
||||
{
|
||||
var names = new List<string>();
|
||||
var handles = new List<int>();
|
||||
@ -132,16 +132,12 @@ namespace UnityExplorer.Inspectors
|
||||
|
||||
foreach (string scene in names)
|
||||
{
|
||||
m_sceneDropdown.options.Add(new Dropdown.OptionData
|
||||
{
|
||||
text = scene
|
||||
});
|
||||
m_sceneDropdown.options.Add(new Dropdown.OptionData { text = scene });
|
||||
}
|
||||
|
||||
if (!handles.Contains(m_currentSceneHandle))
|
||||
if (!names.Contains(m_sceneDropdown.itemText.text))
|
||||
{
|
||||
//m_sceneDropdown.transform.Find("Label").GetComponent<Text>().text = names[0];
|
||||
m_sceneDropdown.itemText.text = names[0];
|
||||
m_sceneDropdown.transform.Find("Label").GetComponent<Text>().text = names[0];
|
||||
SetTargetScene(handles[0]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user