Search Unity

Meaning of Error: Unknown managed type referenced: [Assembly-CSharp]

Discussion in 'General Discussion' started by Mfknudsen, May 8, 2021.

  1. Mfknudsen

    Mfknudsen

    Joined:
    Jun 8, 2019
    Posts:
    3
    After every reload i get the error message:

    Unknown managed type referenced: [Assembly-CSharp] AI.BehaviorTree.Nodes.Transition

    I can't find Transition but I do have a TransitionNode.

    There is no Transition file in my assets and searching in visual studio doesn't show anything.

    I have tried looking online but most search result I find is about [SerializeReference] but i fail to understand how it's related.
     
  2. CaseyHofland

    CaseyHofland

    Joined:
    Mar 18, 2016
    Posts:
    613
    What likely happened is that you renamed Transition to TransitionNode which caused your old references to break. And because Unity... messed up, SerializeReference never recovers from that.

    https://forum.unity.com/threads/ser...en-class-name-is-changed.736874/#post-6557317

    This post tells you how to rename a class and keep your old references intact, and if you scroll down a bit further I have a post on how you can make sure this problem never happens again (if you forget to add [MovedFrom] or want to actually delete the script instead).