Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bug Version Control Issues with Array with [SerializeReference]

Discussion in 'Prefabs' started by yu_yang, Sep 17, 2021.

  1. yu_yang

    yu_yang

    Joined:
    May 3, 2015
    Posts:
    60
    My
    MonoBehaviour
    contains an array with
    SerializeReference
    attribute, two error messages might appear when select a prefab with this
    MonoBehaviour
    :
    • The serialize array of [Serialize Reference] objects is missing entry for Refid -2
    • [Worker0] Tried select unknown importer for id '-2' '00000000000000000000000000000000'
    If save the project, version control will tell you there are many 'rid' changed in this prefab, and all variants of this prefab are changed too. It breaks version control totally.

    Unity version: 2021.2.b10
     
  2. MirceaI

    MirceaI

    Unity Technologies

    Joined:
    Nov 24, 2020
    Posts:
    24
    MasterZ0 likes this.
  3. yu_yang

    yu_yang

    Joined:
    May 3, 2015
    Posts:
    60
    I tried to make a simple example, but I don't know how to reproduce it. In our project, every time we open Unity or exit the play-mode then save the project, this problem will definitely occur. In version control you can see 'rid' changed.

    upload_2021-9-29_12-21-11.png

    This makes our team crazy. I can't send our project as an example, because the project uses some private packages that you can't access.
     
    Rodolfo-Rubens likes this.
  4. LoneDev6

    LoneDev6

    Joined:
    May 22, 2013
    Posts:
    20
    I had the same error, to fix it I had to:
    - close Unity
    - revert the broken IDs using a previous commit of GIT
    - delete these folders: Library, Logs, Temp
    - start Unity
     
  5. MarsCitizen_1

    MarsCitizen_1

    Joined:
    Jun 2, 2016
    Posts:
    20
    I get the worker error after updating project from Unity 2020.3 to 2021.2.6, whenever opening a Prefab that has a .PSB or .PSB-derived prefab variant.

    All of the PSBs were re-imported as part of the Unity 2021 upgrade process, I feel like maybe there is a re-import process I can run after tweaking some values to ensure they are imported in a way that Unity is happy with.

    To clarify, this error:
    [Worker0] Tried select unknown importer for id '-2' '00000000000000000000000000000000'
     
  6. Rodolfo-Rubens

    Rodolfo-Rubens

    Joined:
    Nov 17, 2012
    Posts:
    1,196
    Sorry to necro this post but I'm getting this same behaviour, every time someone opens the project this happens, this rid keeps getting regenerated for some reason. Any bug ticket for it?