Search Issue Tracker
Fixed in 2018.1
Won't Fix in 2017.4
RequireComponent causes components on prefabs to be duplicated on play
1) Open user's attached project
2) Open "TestScene"
3) Select "PrefabInstanceWithColliderReplaced" prefab in hierarchy to see components' (especially colliders) behavior
4) Start scene
Prefab which bugs reproductions steps:
1) Create a new game object.
2) Add a BoxCollider2D.
3) Add the ScriptRequiringCollider2D component I have attached to my bug
4) Create a prefab out of this game object.
5) Instantiate another copy of this prefab into the scene.
6) Add another collider that will satisfy the component dependency, say,
7) Remove the original BoxCollider2D from the prefab instance.
The more you starting scene and ending, more errors and colliders you get.
Works only with users attached prefab (watch attached gif).
Bug appears on both 3D colliders and 2D.
If component exist on object, shouldn't create a copy of it.
Creates as many copies of component as many times scene has been started.
Also sends error on start and stop scene:
"Error removing component when merging prefab changes: Can't remove BoxCollider2D because ScriptRequiringCollider2D (Script) depends on it"
5.0.4f1, 5.1.4f1, 5.2.4f1, 5.3.0f4, 5.3.3p2, 5.3.3p3, 5.3.4f1, 5.4.0b8, 5.4.0b10
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- Cannot activate license within a docker container
- [CPU PLM] Radeon Pro denoiser does not work upon the first bake using CPU PLM
- [IL2CPP] Player crashes after calling HttpClient when Incremental GC is enabled
- [Android 4.1][IL2CPP] IL2CPP app built with "Strip Engine Code" enabled crashes/freeze on Android 4.1 OS devices
- [2018.4] Console throws a Warning about corrupted ProjectVersion.txt file which is in another Project