Odin needs asmdef files

Issue #345 open
Dominic Antonelli created an issue

In order for Odin to work properly in projects that use Assembly Definition files, it needs it's own asmdef files. Are you planning to add them? There needs to be one main asmdef file at the root of the Odin package, and one in each Editor folder (because Unity is dumb).

Maintaining these files myself is a pain, and doesn't feel right as I have to put files into your directories, which means I have to be really careful anytime I update Odin.

Comments (4)

  1. Tor Esa Vestergaard
    • changed status to open

    Are you using Odin in source mode? If yes, then we agree - we should put some asmdef files in there to make it work more smoothly in the new system. If you're not using Odin in source mode, however, then we're a little confused as to what benefit you think they might offer.

  2. Dominic Antonelli reporter

    Yes, I am using Odin in source mode. However, I've been doing more research into this issue (because it affects all packages, not just Odin, including some we're working on ourselves), and it seems like at present, Unity does not quite provide enough support for asmdef files for them to be feasible. Namely, if you have some third-party packages with and some without asmdefs, then you're completely hosed:

    On the one hand, if a package you want to include has an asmdef, then you need an asmdef at the root of your project (or at least the root of any scripts).

    On the other, if you have an asmdef file for your project scripts, then they cannot reference anything in a package that doesn't have an asmdef.

    This would all be fine, you could just put an asmdef at the root level of the project, or one in your "packages" or "imports" or whatever you want to call it folder, and you'd be fine, except that once you have an asmdef file, the "Editor" magic folder compiling into it's own assembly stops, and now you need asmdefs in every Editor folder... which is complete nonsense when using someone else's package.

  3. Jose A. Milan

    Hi!

    I´m using asmdef files, and due to a bug I needed to use the source code version, which lead me to have to create a set of proper asmdef files for Odin, please find them attached zip file, in case you find them useful.

    All the dlls, excluding the attributes one, are build for editor only, so you may need to change them in order to build if using the custom serialization. (I'm not using it)

  4. Log in to comment