Search Unity

Compiled Scripts In Package Not Visible From The Editor

Discussion in 'Package Manager' started by cristian_cristea, Apr 14, 2019.

  1. cristian_cristea

    cristian_cristea

    Joined:
    Nov 27, 2017
    Posts:
    5
    Hi there, I am currently working on having a set of common UI related monobehaviours bundled in a package deployed on a private registry. Things are working as expected except for the fact that the components are not displayed when trying to attach them to a game object through the editor. Through code they work as expected.

    Is this a known limitation? If I package the scripts directly it works properly.

    Also is there a guideline to properly export an assembly (using asmdefs) to dll and include debug information other than taking the dll from temp/bin after a build in VS?

    Thank you
     
  2. samuelb_unity

    samuelb_unity

    Unity Technologies

    Joined:
    Nov 13, 2017
    Posts:
    47
    Hi,

    Regarding dragging assets from packages into a scene, this is not yet supported. The reason is that packages from the registry are immutable by design. This allows them to exist in a global cache which any project can reference but cannot modify. Therefore when you drag an asset into a scene, you'll typically see all the widgets in the inspector greyed out because the asset is read-only. The current solution is to make a local copy of the package which is editable. You can do this by copying the package into the project's "Packages" folder, or by pointing to a local package using the "file:" notation in the project manifest. Let me know if you need help with this!

    As for exporting a DLL with debug information, I will get back to your shortly...
     
  3. cristian_cristea

    cristian_cristea

    Joined:
    Nov 27, 2017
    Posts:
    5
    Hi, thank you for the feedback. The problem with the suggested approach is that we lose the benefits of easily updating the packages which currently are updated at a high rate in numerous projects.

    Are there any plans of addressing this in the future? I see a possible solution to have some packages installed by the package manager in project's Packages folder.

    I'm looking forward on the debug info :)

    Thank you
     
  4. Stephen-Hodgson

    Stephen-Hodgson

    Joined:
    Jul 15, 2014
    Posts:
    23
    This could be quickly remedied by making a copy of the prefab and prompting the user to save it locally in their project.
     
  5. samuelb_unity

    samuelb_unity

    Unity Technologies

    Joined:
    Nov 13, 2017
    Posts:
    47
    You're absolutely right, it's not ideal. We are planning to address this although we are still working out the best experience and implementation :)