Search Unity

How to rename ScriptableObject retaining serialized data and links?

Discussion in 'Scripting' started by Lynxed, Sep 1, 2019.

  1. Lynxed

    Lynxed

    Joined:
    Dec 9, 2012
    Posts:
    121
    Is there a way to rename ScriptableObject class name but link serialized data? There is no [FomerlySerializedAsAttribute] for class names.
     
    leni8ec likes this.
  2. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,637
    Hi @Lynxed

    I don't actually have you a proper answer... but so far I've done it just by first renaming the SO class in code editor, then renamed the SO class file itself in unity Project view.

    At least simple ScriptableObjects with fields have been pointing correctly to renamed class (and no serialized data lost).
     
    Alekxss, leni8ec and Lynxed like this.
  3. Lynxed

    Lynxed

    Joined:
    Dec 9, 2012
    Posts:
    121
    It actually worked, thank you!