Search Unity

Renaming scripts in a DLL without breaking references in scenes.

Discussion in 'Scripting' started by gtzpower, Oct 12, 2018.

  1. gtzpower

    gtzpower

    Joined:
    Jan 23, 2011
    Posts:
    318
    Hey everyone, I know renaming scripts without breaking references in scenes has been discussed a dozen times, but the answer is usually to rename a script through Unity and let Unity handle the update of all of the references. This doesn't work when the MonoBehaviour is being used from a DLL though because the file must be renamed in the Visual Studio project and recompiled into the DLL, then that DLL can be reimported.

    Any ideas on how to handle renaming scripts when they are contained in DLL's so we don't break every project using them? Something like a class level FormerlySerializedAsAttribute would be perfect, but I don't know of anything like that. Thoughts?