Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. We are looking for feedback on the experimental Unity Safe Mode which is aiming to help you resolve compilation errors faster during project startup.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

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?
     
unityunity