Search Issue Tracker

Won't Fix

Votes

0

Found in

2018.1.0f2

Issue ID

1034050

Regression

No

Dll's script assets are missing after importing assetpackage on .NET 4.6

Scripting

-

To reproduce:
1. Create a new project
2. Make sure that Scripting Runtime Version is set to .NET 4.x
3. Import attached "testing.unitypackage" file
4. At the menu press TEST > RUN
5. Observe the warning in the console: No script asset for GameDataDefsAsset. Check that the definition is in a file of the same name.
6. Observe that the scrip assets are missing in the .dll's
7. Right-click in the Project folder > Reimport All
8. Observe as the script assets get imported to .dll's

Expected result: .dll's script assets are imported when importing assetpackage
Actual result: script assets only get imported after pressing Reimport All

Reproduced on:
2017.1.4f1 2017.2.3p1 2017.3.2f1 2017.4.4f1 2018.1.2f1 2018.2.0b6 2018.3.0a1

Notes:
On 2017.4.4f1, 2018.1.2f1 TestRuntime.dll's script asset is imported, but not TestEditor.dll's
Does not reproduce on .NET 3.5

  1. Resolution Note:

    This particular case has been investigated thoroughly and we have decided, in the interests of protecting the stability and features of Unity for users that rely upon the affected versions, to not address this fix for the time being. We understand that this will cause problems for some users, and so may address in a future version.

Comments (1)

  1. eneko-unity

    Oct 26, 2018 09:52

    Hi,

    I've been investigating this issue and this is what I found:

    testing.unitypackage has the following dlls

    Test/lib/Editor/TestEditor.dll
    Test/lib/Runtime/TestRuntime.dll

    It seems like some classes inside TestEditor.dll have a dependency with classes defined in TestRuntime.dll

    In Unity when we import a dll we use loaded classes and classes from dlls in the same directory to figure out if a class has to be imported by Unity or not. The problem here is that when Unity is importing TestEditor.dll, TestRuntime.dll hasn't been imported yet and because the dll is in a different directory too Unity can not resolve the dependant classes that are defined in TestRuntime.dll.

    Currently we are looking in a solution to mark asset dependencies (a way to tell Unity to import TestRuntime.dll before TestEditor.dll), so this is something we have to do before being able to fix the bug.

    The workaround for this would be rather manually import TestEditor.dll after TestRuntime.dll has been imported or have both dlls on the same directory.

    Finally, this problem also happens in .NET3.5, so this is not a regression in .NET4.0.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.