Search Issue Tracker
Fixed in 5.0.X
Votes
0
Found in
5.0.0b18
Issue ID
661239
Regression
Yes
[Prefab] gameObject.GetComponents(list) does not get components on prefab
Steps to reproduce this issue:
1. Open the attached project
2. It has 'test' prefab
3. Prefab has 2 scripts: 1) MainScript 2) SubScript
4. MainScript uses: 1) this.GetComponents(list1); and 2) gameObject.GetComponents(list2) to get and add 'SubScript' components to lists
5. On Prefab toggle the checkbox "toggle me to validate"
6. Watch the log as it counts number of list elements:
this.GetComponents(list) 1 / gameObject.GetComponents(list) 0
7. Drag 'test' prefab into the scene
8. Toggle the same checkbox
9. Now log indicates:
this.GetComponents(list) 1 / gameObject.GetComponents(list) 1
Works fine in 4.6
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Tooltip messages should be presented in human language not in code strings
- [Linux] Editor doesn’t auto reload when an Asset is imported or a Script is changed
- MouseDownEvent is triggered when changing from Scene view to Game view
- "GlobalObjectIdentifierToObjectSlow" returns Null when retrieving "GlobalObjectId" from GameObject inside a Prefab
- Shader is invisible in the Build when using BiRP on Meta Quest 2
Add comment