I am developing a soon-to-be non-commercial open source project that has some dependencies on some Unity dlls (UnityEngine.CoreModule.dll, UnityEditor.dll, etc.). The project is developed outside of a Unity project and so, in order to resolve the Unity dependencies, I make local copies of the Unity dlls next to the project and reference them relatively (referencing the dlls directly in “Program Files/Unity/Hub/Unity2018.x.x/etc.” is not a viable option).
This means that when the project goes open source, the dlls would be included on GitHub in order to allow contributors to easily setup their development environment. I was wondering if there were license issues associated with this practice and if so, how do I mitigate those issues?
Note that the project is looking to be MIT licensed.
No, you can not. The UnityEngine.dll and other modules are part of the Unity engine. They can be distributed with a game build with the Unity engine. You are no allowed to use of distribute parts of the engine outside a Unity project.
Apart from that most things you find inside the UnityEngine.dll requires the native core of the Unity engine as many parts of the UnityEngine.dll are just wrapper classes which refer to externally defined methods. This is not only true for the various component classes but also parts of the strucs (like Vector2/3/4, Matrix4x4, Quaternion, …).
I don’t think there’s anything inside the UnityEngine.dll that would be worth using outside of Unity. If it’s something simple it’s probably easier to implement the functionality yourself. If it’s more complex it most likely depends on the engine core anyways. What exatly are you using from those assemblies?
Thank you for the precision. Your first point makes it very clear.
As for the second point, I am very well aware that Unity dlls require the underlying engine to be running and since the project I am developing is meant to be used with a running instance of Unity, this should not be an issue. I mainly need to reference the dlls to get the project to compile and so in the compiled project, Unity’s dlls are not required. Sorry if was not clear enough, but I need the dlls only when developing the project but since the project is soon-to-be open sourced, I want the whole development setup to be publicly available, including project-local copies of Unity’s dlls (to get the project compiling).
Since distributing the copies of Unity’s dlls is not possible, what would be the preferred way (that would work cross-platform) of retrieving them from an existing Unity installation? Note that I’d rather have a solution that doesn’t require Unity to be running such that one can open the project in ‘Visual Studio’, hit compile and all dlls should be resolved. If nothing else works, I will require users to lauch Unity and I will use ‘EditorApplication.applicationPath’ to retrieve the dlls.