mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2025-06-16 14:17:51 +08:00
Fix JumpToTransform exception with HideAndDontSave
This commit is contained in:
parent
409a468b55
commit
8f1f6cd0b2
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user