Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Skinned Mesh Renderer + Prefab bug?

Discussion in 'Editor & General Support' started by Rs, Aug 11, 2021.

  1. Rs

    Rs

    Joined:
    Aug 14, 2012
    Posts:
    74
    Hello everybody,
    I wonder if someone has clues on this trouble that's torturing me. My project is basically being turned into dust by this bug.

    Everything was working perfectly in another machine. I ported the project exactly as it was to another machine and one model that has a skinned mesh renderer is completely messed up. I cannot be much more specific because I really don't know what's going on. See the following:

    How it's supposed to be (selected) VS how it is on the left.



    I guess it's something to do with the fact that the left object is a prefab with a few changes on top of the vanilla model. As you see the model is intact but the prefab that is based on it isn't.

    Interesting that I found that if I do Copy Component from one of the objects the vanilla model in the scene, and than Paste Component Values in the prefab's corresponding object, the mesh snaps back to normal.
    I made a video of this which you can see at
    .

    I am having the same issue in Unity 2019.2.3f1, 2019.4.29f1, 2019.4.6f1, Unity 2021.1.14f1

    I remark that the model was copied as it was excluding the Library folder. So it's a save/load problem.

    If anyone has any solid clue I would immensely appreciate, hopefully some Unity people can have a look too.
    Greetings all!
     

    Attached Files:

  2. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,554
    In hierarchy view, try:
    1. Duplicate the broken object. (Ctrl+D)
    2. ON THE DUPLICATE, select root of the prefab instance, go to prefab menu --> Overrides and try "revert all"
    upload_2021-8-11_19-40-42.png

    This will reset the model to its original state in the prefab.
     
  3. Rs

    Rs

    Joined:
    Aug 14, 2012
    Posts:
    74
    Tried that already, no luck. The prefab was all "applied" and committed to a repository so I am sure that it's exactly the same that worked in the original project on the 1st development machine (which is now gone). But I did try to do whatever I could think of between reverting the prefab, resetting via git to previous versions, nothing changes.
     
  4. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,554
    What "other components" are there?
    The object name says something. Is it "withBioIk"?

    Also, unity has tech support. That's one of the cases where you might want to contact it.
     
  5. Rs

    Rs

    Joined:
    Aug 14, 2012
    Posts:
    74
    Yes I am using Bio IK but only on some of the bones (legs) of the bee's model.
     
  6. IllTemperedTunas

    IllTemperedTunas

    Joined:
    Aug 31, 2012
    Posts:
    782
    Couple things you can try off the top of my head...
    Most likely solution but tedious and may not solve your issue: Find the base mesh of the asset, bones and all, delete the mesh and bones from the prefab and reinsert them.

    Unity is really bad at allowing you to set the "Base pose" of a rig and as far as i can tell it's internal and invisible.

    Another thing you can try is check the animation file that ran on the object last. If it defines positions of bones, it will override the base positions and it will be "stuck" in a bad pose until an animation made for that rig is played to reset it. If this is the case, and it very may well be, either edit the aniamtino file if you can and delete all the position data, or copy all teh frames, paste them in a new file and delete them in the new unity file, then replace said animation with the new one.

    Press control + 6 with the model selected and try cycling through various animations and see if it "resets" the bone positions.
     
    Last edited: Aug 12, 2021
  7. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,554
    I think it might be the one responsible.

    Try duplicating the model and killing off bioIK comletely or disabling it on the duplicate.

    Now a good question is why would bioik pose at editor time.