Search Unity

Replacing scripts with assemblies generated from asmdef

Discussion in 'Editor & General Support' started by Florian-Nouviale, Nov 21, 2018.

  1. Florian-Nouviale

    Florian-Nouviale

    Joined:
    Mar 14, 2013
    Posts:
    54
    Hi,

    We would like to distribute our project with assembly files instead of .cs scripts.
    We thought that this would be easy thanks to assembly definition files, as unity is creating assembly files for the scripts they refer to anyway.
    It turns out that when removing the .cs files and putting the assemblies, we ran into a problem :
    Themono behaviors defined in the assemblies (so previously in our scripts) can't be added manually to a scene : "Can't add script component xxx because the script class cannot be found"
    While if we add the component through script (i.e. AddComponent) it works

    I'm using Unity 2017.3.f1 to generate the assembly files

    I think that was not a usage Untiy thought about, but I think it can be very useful for package developers who want to automate package creation with assemblies while working on script files internally.
    Anyway, any help or information would be appreciated :)

    thanks