Search Issue Tracker
Fixed in 2022.1.X
Fixed in 2020.3.X, 2021.2.X
"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)
Feb 27, 2022 19:28
Still seeing this in 2021.2.13f1
Appears to do a full reload/reset of the "missing" component.
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
Nov 04, 2021 15:37
I'm getting this in 2021.1.25f1
It spams it repeatedly without stopping.
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.
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.
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.
Jun 22, 2021 17:27
This is so annoying we really need a fix
Jun 22, 2021 11:35
I fixed the problem by adding the component myself. Unity version 2021.1.12f1
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
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.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- The terrain appears darker when "Per-pixel Normal" is enabled
- [Linux] Editor assertion causes Test Runner to fail when executing it in Batch Mode
- Color selection by the mouse cursor is still enabled when the "Esc" button is pressed
- Game view becomes black and the Scene window becomes grey, “ArgumentOutOfRangeException” errors and “Render Pipeline error” warnings appear after changing the name or deleting URP/HDRP global settings file
- Transform Component is not accessible inside the Player when RuntimeInitializeOnLoadMethod is used
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