mirror of
https://github.com/GrahamKracker/UnityExplorer.git
synced 2025-07-01 03:12:40 +08:00
Fix JumpToTransform exception with HideAndDontSave
This commit is contained in:
@ -79,7 +79,11 @@ namespace UnityExplorer.ObjectExplorer
|
|||||||
var go = transform.gameObject;
|
var go = transform.gameObject;
|
||||||
if (SceneHandler.SelectedScene != go.scene)
|
if (SceneHandler.SelectedScene != go.scene)
|
||||||
{
|
{
|
||||||
int idx = sceneDropdown.options.IndexOf(sceneToDropdownOption[go.scene]);
|
int idx;
|
||||||
|
if (go.scene == default || go.scene.handle == -1)
|
||||||
|
idx = sceneDropdown.options.Count - 1;
|
||||||
|
else
|
||||||
|
idx = sceneDropdown.options.IndexOf(sceneToDropdownOption[go.scene]);
|
||||||
sceneDropdown.value = idx;
|
sceneDropdown.value = idx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user