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
- Fixing Message Loss in UMPE During Domain Reload
- The Editor freezes when ScheduleReadOnly of IJobParallelForTransform with dependency is used
- Text is truncated in the Inspector when the display scale is set to 150%
- CancellationTokenSource(<timeout>) has incorrect cancellation status when used in WebGL Player
- VFX property value names are cut off when properties with 'Arc' are viewed in the VFX Blackboard
Add comment