Search Issue Tracker
By Design
Votes
3
Found in
4.3.0f4
Issue ID
594367
Regression
No
GameObject.FindGameObjectsWithTag() returns selected prefabs
To reproduce:
1. Open attached project
2. Open scene "Example"
3. Enter play mode - a label shows how many gameobjects are there with the tag "Target" - which is one
4. Select the plane prefab in the project view - it suddenly says that there are two object with the tag
Resolved by design - unfortunately, this is expected behavior with how the Unity Editor works right now. We are aware that there are conflicts about how everything in the editor get "instantiated" into the current scene. We're looking into solutions for this problem in general. This will be fixed with that larger fix.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- The Sprite Library Editor window has an incorrect order of Sprites when the Sprites are reordered and the order saved
- Tilemap Tiles do not get lit up unless the Light Range is greater than the distance between the position of the Tile before the transformation and the Light Source when the Tile is transformed with Tilemap.SetTransformMatrix method
- The Editor and "Reloading Domain" windows are frozen when entering Play Mode
- Crash when attempting to create a custom FMOD DSP unit
- [Linux] Floating windows do not keep their size after restarting the Editor
ZyntaxError
Jul 16, 2015 11:04
Reproduced in Unity 5.1.1f1.
Selecting prefab that has a Renderer component which shows preview window causes GameObject.Find and GameObject.FindGameObjectsWithTag to find that object or any child.
Profiler shows me that gameobjects count in scene increases when the preview window is showing something.
ssheets
Oct 20, 2014 23:33
Still present in 4.6.0b17. Causes "Object reference not set to an instance of an object" when you try to perform operations on an array that should be empty.