- Home /
Distributing codes that have dependencies with other assets
I have bought a few scripts from the Assets store to use them in my game. I was thinking that I want to publish the game's source code among a group of people so that we all can work together. To share it among my friends, I export my project. Unity needs to export its dependencies too for it to work.
And here's the problem. My intention is to share my own code. But because my code has dependencies with other Assets, Unity exports them together. If I share this exported package, I would accidentally share the Assets' codes, which may not be rightful to do so.
I'm still new to Unity and so perhaps I am missing out certain functions within Unity. Is there a feature that allow me to compile the Assets into binary form, which my code can still depend on and work when I share my exported project package with friends, and also won't accidentally share codes that I am not suppose to? Something like a JAR file in Java that developers could just exchange the JAR files and import them into their project to use without exposing the codes?
I'm fairly new to Unity and have never used DLL before. I did a search but still not sure what I should do. Are there any tutorials on this matter? Thanks!
Answer by whydoidoit · Oct 05, 2012 at 09:58 AM
Unity should only export those DLLs if your code is dependent on them - if it is dependent on them then your group would need those assets in order to use your code. Most often this means that the group would need licenses for the referenced components.
If you want to copy the code without the dependencies as a package - uncheck the include dependencies checkbox - but be aware it is unlikely that the code would compile and work.
$$anonymous$$ost asset store assets now indicate if you need to purchase one license per developer. In any case, if this group are not working on your project then they would need a license each.
You mentioned that I could export as DLL from within Unity. Would this solve the problem of releasing the source code of the asset dependencies? That is, other developers could simply import the DLL and use as how he would expect, like importing an Unity package but only revealing the prefabs but not the code? Thanks.
If you were to distribute an Asset Store asset that was a DLL it would be the same as distributing its source code from a licensing stand point - the license would allow you to create a game using the DLL not distribute it.
Your answer