wooga / Paket.Unity3D

An extension for the Paket dependency manager that enables the integration of NuGet dependencies into Unity3D projects.
http://wooga.github.io/Paket.Unity3D/
The Unlicense
42 stars 9 forks source link

Allow packages to be installed as editor-only #12

Open kibiz0r opened 8 years ago

kibiz0r commented 8 years ago

I need to be able to specify that some packages are only relevant to the editor assembly.

For example, I want to use Moq for unit testing, and I'd like to use Paket to keep the dependency fresh, but the DLL needs to be under an Editor/ path because it's not even a valid Unity-friendly assembly in a non-editor context -- not that I want Moq.dll in my app, anyway.

I can simulate the behavior by wrapping the package myself and nesting the DLL under Editor/, but that only works for this case because you would never want to have Moq outside of an Editor/ path. And it kind of defeats the purpose of using a package manager to track updates to external code.

For dependencies like, perhaps, an HTTP client, that you may want to use in your app or just in the editor, I need to able to tell Paket.Unity3d which way to handle it.

There is also the curious case of tools like all of the Prime31 stuff, which absolutely demand that they be under Assets/Editor/<tool-name-here>, no subdirectories allowed.

This may be related to #10, as Paket 2.x adds groups, which may be a useful path to implementing this feature.