Search Issue Tracker
Fixed in 2022.1.X
Fixed in 2020.3.X, 2021.2.X
Votes
15
Found in
2020.2.7f1
2020.3
2021.1
2021.2
Issue ID
1319932
Regression
No
"Creating missing component" warnings are thrown continuously when selecting a Prefab
How to reproduce:
1. Open the attached project's "case_1319932-Project.zip" Scene labeled "SampleScene"
2. In the Project Window, select the "GameObject" Prefab
3. In the Inspector, under Component B, toggle the checkbox
4. Observe the Console Window
Expected result: No warnings are thrown
Actual result: "Creating missing B component for A in GameObject." warnings are thrown continuously
Reproducible with: 2020.3.1f1, 2021.1.0b12, 2021.2.0a9
Couldn't test with: 2018.4.33f1, 2019.4.22f1 (Converting GameObject into a Prefab doesn't add the missing required component)
-
DigitalChaotics
Feb 27, 2022 19:28
Still seeing this in 2021.2.13f1
Appears to do a full reload/reset of the "missing" component.
-
DabMK
Jan 06, 2022 14:23
This bug happens only if a script is named "PlayerController.cs", to fix just rename the file and the class name inside of it
-
Charlicopter
Nov 04, 2021 15:37
I'm getting this in 2021.1.25f1
It spams it repeatedly without stopping. -
NilsRungholm
Sep 15, 2021 19:16
Having the exact same issue as SCHUHBACCA in 2021.1.20f1. Editor will periodically throw "Creating missing CapsuleCollider component for PlayerController in Player" and "Creating missing Rigidbody component for PlayerController in Player" (my script is even named the same).
My script "PlayerController" doesn't even have the above types listed in the [Requires(...)] attribute.
-
Daeval
Jul 21, 2021 22:29
Saw this or potentially related issues in v2021.1.13f1:
- Saw the "Creating missing B component for A in GameObject." infinite loop when moving components up and down in the inspector on a prefab that already had both A and B components.
- Saw the "Creating missing B component for A in GameObject." warning twice in a row (but no infinite loop) when dragging a single ScriptableObject to a component property on a prefab which already had both A and B components.
-
unfitforbingo
Jul 03, 2021 19:28
Note that when it gets into one of these loops, values continually get reset to default.
Agree with shimonp21 that this is an important check. Sucks to remove requirements from components (and deal with the inevitable runtime errors) but this bug is a blocker.
Funny (not) how one bug leads to more bugs getting created.
-
Vincent13122
Jun 22, 2021 17:27
This is so annoying we really need a fix
-
Dant54
Jun 22, 2021 11:35
I fixed the problem by adding the component myself. Unity version 2021.1.12f1
-
shimonp21
Jun 07, 2021 11:26
Same thing is reproduced in 2021.1.7f1
Since my code architecture is based on decoupled scripts , I am very reluctant to remove the [RequireComponent] annotations, but I'm not sure what I can do.
please please fix this -
Setzor
Jun 06, 2021 17:15
This just happened on one of my prefabs after adding a required audiosource component. Thought I had a script doing something somewhere, but nope, pretty basic project.
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
- Inspector's custom tooltip is displayed incorrectly when the name is truncated in UI toolkit
- Crash on ScriptableRenderLoopDraw when rendering a specific VFX in Play Mode
- The script is not renamed in the Project window when renaming and a compilation Error is present
- Average FPS in Play Mode degradation on a newly created BiRP project when it's upgraded from 2020.3.48f1 to a newer Editor version
- DecoratorDrawer indentation is incorrect when it is called with EditorGUI
Resolution Note (fix version 2022.1):
Fixed in: 2022.1.0a11
Resolution Note (fix version 2021.2):
Fixed in 2021.2.9f1
Resolution Note (fix version 2020.3):
Fixed in: 2020.3.28f1