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
- Physics SyncColliders 3x-7x performance regression from 2022LTS to U6
- ListView's '+' button causes a recursively dispatching event when the visual element area is filled up
- Soft keyboard closes immediately after multiple touches are made if Pointer Behavior is set to SingleUnifiedPointer
- UI Image batching breaks when interleaving elements with mixed z-positions and materials
- KeyNotFoundException is thrown when retrieving some values from HyperLinkClickedEventArgs
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.