Search Unity

Any way to add assembly definitions when exporting packages?

Discussion in 'Editor & General Support' started by Sharlatan, Nov 11, 2018.

  1. Sharlatan

    Sharlatan

    Joined:
    Jul 23, 2013
    Posts:
    111
    Hey everyone!

    I'm not sure if this is the right sub forum to ask, so, if not, sorry and please point me in the right direction!

    My question is: Is there any way to export assembly definitions as well, when exporting a package?

    I've got a utility project that I use in other projects. For reasons like quickly looking up code, make experimental changes, etc. within the project I'm currently working on, I export the utility project files as asset package and not as dll. Problem is though, the export dialog doesn't let me select assembly definition files.

    This means, that I have to set up the assembly definitions in the utility project, then when I export the files and import them in another project again, I will also have to manually copy and clone the whole assembly definition structure I have in the utility project in the other project as well. And every time I make any changes concerning assembly definitions in the utility project, I have to manually update those changes in all the other projects that make use of the utility project.

    Surely, there must be a better way. Am I missing something?
    Thanks!
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,299
    Hey. This sounds like a bug. Could you please file a bug report so we can investigate?
     
    cdr9042 likes this.
  3. cdr9042

    cdr9042

    Joined:
    Apr 22, 2018
    Posts:
    173
    I ran into this issue on 2019.4.8
     
  4. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    738
    Just ran into this issue in 2022.2.0b11

    Folder structure goes like this:
    Code (CSharp):
    1.  
    2. Common
    3.   -Shared
    4.     -Common.Shared.asmdf
    5.     -Extensions
    6.       -SomeExtension.cs
    7.       -OtherExtension.cs
    There is no option to choose the asmdf file, and it does not export properly.
     
  5. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,299
    Could you please file a bug report?
     
  6. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    738
    Submitted a bug report.
    CASE IN-22256
     
    karl_jones likes this.
  7. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    738
  8. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,299
    We switched to a different bug system but you can use either to track. They are both linked.
     
    Gekigengar likes this.
  9. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    738
    Hello, I noticed I can't track whatever is happening with the bug like I could in the issue tracker.
    https://issuetracker.unity3d.com/is...ild-when-active-input-handling-is-set-to-both

    This is previous issue I've submitted on forums, and opened by one of the UI Toolkit devs.

    On the new system however.
    Nothing moved, no comments, no updates, nothing.
    Is it reproducable? Do I need to provide more information? Is it by design?
    Previously I can always keep track of whatever is happening with the issue ticket.
    Most importantly, is it being looked at? Or worked on?
     
  10. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,299
    It doesn't have a tracker link yet because it has not been confirmed as a bug by QA. Once they confirm it then it will get an issue tracker link. This is also how the old system worked.
     
  11. TK009999

    TK009999

    Joined:
    Nov 28, 2016
    Posts:
    8
    Hello, I have the same issue on Unity 2022.1.16f1
     
  12. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    738
    Please open a new case. My case hasn't been processed since more than a month ago. It might get us more visibility.
     
  13. valtech-alejandro

    valtech-alejandro

    Joined:
    Nov 3, 2022
    Posts:
    1
    Is there any update on this? I'm facing same issue in Unity 2021.3.16f1
     
  14. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,299
    I believe it's fixed in 2022.2.0f1. unfortunately there's no plans to backport this at the moment.
     
  15. pokelocos

    pokelocos

    Joined:
    Nov 9, 2015
    Posts:
    54
    Last edited: Jun 29, 2023
  16. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,299
  17. pokelocos

    pokelocos

    Joined:
    Nov 9, 2015
    Posts:
    54
    Apologies, I'm not sure how to do it. Can you please guide me?
     
  18. karl_jones likes this.
  19. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,299
    The error you are describing in the linked thread is different from this bug. You want asmdef DLL dependencies to also be copied across. So we will need a new bug report for that although I would suggest looking into creating a custom package and adding Newtonsoft JSON as a package dependency instead. That will work now.
     
  20. pokelocos

    pokelocos

    Joined:
    Nov 9, 2015
    Posts:
    54
    That's exactly what I want to do, but I have no idea how to do it. "Creating a custom package and adding Newtonsoft JSON as a package dependency instead" is what I've read elsewhere, but I don't understand how to do it. :C
     
  21. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,299
    Try this
    https://docs.unity3d.com/Manual/CustomPackages.html

    You want to add
    "com.unity.nuget.newtonsoft-json": "3.0.2"

    As a dependency in the package json