Search Unity

Question AnimatorController YAML - Extraneous AnimatorStateTransitions

Discussion in 'Animation' started by lcompton, Dec 9, 2023.

  1. lcompton

    lcompton

    Joined:
    Mar 31, 2018
    Posts:
    102
    I have an AnimatorControl that's a copy of another one. The original states and transitions have been deleted, but I kept the layers and parameters (which was why it was created it via copying). I've been seeing errors like the following...

    Broken text PPtr in file(Assets/Prefabs/Spawnables/Characters/Critter/Animation/CritterAnimatorController.controller). Local file identifier (5155392382958001556) doesn't exist!


    I took a look at the YAML and discovered there are a bunch of AnimatorStateTransitions that should have been deleted but are still present in the file. The file ID reference is indeed referring to a nonexistent file.

    So, how do I get rid of these stragglers? Obviously, I could hand edit the file, but I'd prefer to have the editor clean up the file for me.
     
  2. lcompton

    lcompton

    Joined:
    Mar 31, 2018
    Posts:
    102
    Nobody else has seen this?
     
  3. maxjohnsonplaystudios

    maxjohnsonplaystudios

    Joined:
    Oct 7, 2016
    Posts:
    2
    Same. Only way I found was to open the .controller file in a text editor, find the broken file ID references, and delete each broken node manually.

    You *can* do a find-replace on "m_ObjectHideFlags: 1" to "m_ObjectHideFlags: 0" and it will show you all of the sub-nodes present in the project tab asset view... but you still can't directly edit them there.
     
    lcompton likes this.
  4. lcompton

    lcompton

    Joined:
    Mar 31, 2018
    Posts:
    102
    Thanks! That's a good idea. Thanks for the suggestion.

    I think I'm going to file a bug report about this, although I really don't know how the file got in this state in the first place. I don't think I'll be able to reproduce the problem starting with a brand new AnimatorController.