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

Scene Management

-

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)

  1. Resolution Note (fix version 2022.1):

    Fixed in: 2022.1.0a11

  2. Resolution Note (fix version 2021.2):

    Fixed in 2021.2.9f1

  3. Resolution Note (fix version 2020.3):

    Fixed in: 2020.3.28f1

Comments (15)

  1. DigitalChaotics

    Feb 27, 2022 19:28

    Still seeing this in 2021.2.13f1

    Appears to do a full reload/reset of the "missing" component.

  2. 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

  3. Charlicopter

    Nov 04, 2021 15:37

    I'm getting this in 2021.1.25f1
    It spams it repeatedly without stopping.

  4. 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.

  5. 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.

  6. 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.

  7. Vincent13122

    Jun 22, 2021 17:27

    This is so annoying we really need a fix

  8. Dant54

    Jun 22, 2021 11:35

    I fixed the problem by adding the component myself. Unity version 2021.1.12f1

  9. 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

  10. 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

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.