Search Unity

Question Migrating (asset bundles) from Assembly-CSharp to asmdef

Discussion in 'Scripting' started by liortal, Oct 23, 2022.

  1. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    I've read all docs, guides and posts regarding assembly definitions, and I'm also using them with some components.

    Still, some parts of a project I'm working on uses the built-in Assembly-CSharp assembly.
    I'm wondering what is the proper way to migrate all the code from built-in assemblies into .asmdefs ?

    The project heavily uses asset bundles, I suppose bundles have serialized references to components using the fully qualified type name (assembly, namespace, type name), which means that migrating all the code from Assembly-CSharp to assembly definitions will force me to re-build all existing asset bundles ?

    Is there an easy way of doing this ?

    It could've been real helpful to either be able to create an .asmdef named Assembly-CSharp, so that it would still work as before, or some kind of "type forwarding" attribute (similar to FormerlySerialisedAs) to mark the "old name" of our scripts, so that we can maintain compatibility with existing asset bundles.