Search Issue Tracker
Won't Fix
Votes
0
Found in
4.6.0b5
Issue ID
596848
Regression
No
FindGameObjectsWithTag() adds to count the selected prefabs
To reproduce:
1. Open the attached project
2. Run the scene
3. (De)select the Cube prefab from the Project View
4. Notice that the size of the returned FindGameObjectsWithTag() array is increased as you select the prefab and decreased as you deselect the prefab.
This is expected in the editor as GameObject.FindGameObjectsWithTag does not do any filtering. If you want to filter the prefab object you can check if the GameObject is persistent https://docs.unity3d.com/ScriptReference/EditorUtility.IsPersistent.html
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Memory usage rises when switching scenes with GRD enabled and a loaded texture in URP
- [Quality Hackweek] Terrain Brush Size value is not serialized after deselecting the terrain when using the first instance of multiple Inspectors
- "NullReferenceException" is thrown when setting a long string in TMP with "Atlas Population Mode" set to "Dynamic" and "Multi Atlas Textures" enabled
- TextMeshPro text is misaligned when alignment is set via script
- A DX11 shader error is thrown when compiling shaders for platforms without DX11 support
Add comment