Search Unity

How can I get GameObject.FindObjectsWithTag() to work in Prefab editor

Discussion in 'Editor & General Support' started by Phedg1, Jan 13, 2019.

  1. Phedg1

    Phedg1

    Joined:
    Mar 3, 2015
    Posts:
    113
    I've got some [ExecuteInEditMode] scripts that would really be helpful in new nested prefabs I'm making. They work fine in any scenes I'm editing, but when I've opened a prefab in the new prefab editor and I try and use this script, it only returns objects that are in the currently open scene behind the prefab editor. Editing a prefab does not "open" it, like a editing a scene does, instead it just displays its information over the top of everything else, hiding the fact that the scene you last had open is still open.

    Can anyone help?