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
- Trail Renderer visual doesn't match the positions of vertices when they have been offset
- [Mobile] The Material is not visible when using the Decal Renderer Feature
- Uncaught TypeError: Cannot read properties of undefined is thrown when the tab is inactive for several minutes
- Crash on mono_array_length when building a project
- "StackOverflowException" error when changing spline curve type from "Bezier" to "Auto" in the "Element Inspector"
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.