Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

If I use Unity 2D Physics, do I have to distribute Box2D's license with my game?

Discussion in 'General Discussion' started by alexandervitkov, Jun 13, 2023.

  1. alexandervitkov

    alexandervitkov

    Joined:
    Dec 25, 2021
    Posts:
    5
    Unity's 2D physics uses Box2D for its 2D physics - the license of which states:

    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

    My game binaries, as built by Unity, include a build of Box2D embedded in either a dll or the executable, so the way I read it, I need to paste the entire MIT license somewhere in my game files, which I've never seen a Unity game do.

    I'm using Box2D as an example, but this is a more general question for any library that Unity may internally use, which may find portions of its code in my final binaries - do I have to include the license of the original library?
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    3,899
    Typically to comply with the MIT License one would paste that license somewhere in a game screen. You often see this in bigger games where they have strict policies to comply with legal requirements. Of course, it‘s often very well hidden in some About or Credits screen and often only after clicking some small button or link. You will also find this in many mobile apps, too.
     
  3. alexandervitkov

    alexandervitkov

    Joined:
    Dec 25, 2021
    Posts:
    5
    Yes, but this is a library that Unity uses internally, that just happens to make its way to the final build which I distribute, it's not something I've manually added to my project - I use it implicitly when I create a 2D collider.

    I'm perfectly happy to include the license, but this looks like a bit of a minefield, as I don't know what other libraries like Box2D Unity may internally use - is there a exhaustive list of stuff I must credit?
     
    angrypenguin likes this.
  4. CodeRonnie

    CodeRonnie

    Joined:
    Oct 2, 2015
    Posts:
    280
    Take everything I say with a pinch of salt because I am no expert. However, I'm not sure if having your resulting executable game compiled with a dependency on some other binary dll constitutes distributing a "copy" of "The Software." If so, shouldn't that plugin have the necessary license alongside it somehow for anyone who could actually access the dll? Again, I could be totally wrong about that. Couldn't or shouldn't their compiled dll have the license inside of the compiled within the dll itself, or at least just in a file next to it? "included in all copies" I could be way off here, copyright law makes me grind my teeth.
     
    Ryiah likes this.
  5. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    i would say if there's anything "Built in" in to unity you are bound by unity's license and never have to think about any licenses for those libraries etc. That's more between unity and those developers in an agreement to use those libraries in the unity editor itself. I could be wrong but, otherwise you'd have huge lists of licenses to include.
     
    Ryiah likes this.
  6. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    9,900
    Please. talk to a lawyer. Why do you even ask for legal advice on the internet?

    I'm not a lawyer, but AFAIK you don't need to provide notice for anything Unity uses, unless Unity instructs you otherwise. If you want to, that's always fine, most people appreciates the appreciation and crediting their hard work.

    If Unity needs to notice Box2D in their product, they will do it themselves. You aren't responsible for Unity's third-party copyright noticing. Technically you don't even have to know what 2D physics library Unity uses if any.
    When you include any third party asset in your game, you need to carefully read the license and provide notice as needed.
     
    Ryiah likes this.
  7. alexandervitkov

    alexandervitkov

    Joined:
    Dec 25, 2021
    Posts:
    5
    The MIT license is vague as to what it defines as "The Software", but it's generally accepted that binary distributions should retain the notice, and your game contains a binary distribution of the library.

    I will, I'm mostly posting this here to see what the consensus amongst the community is, since this is something that affects a lot of games and I haven't seen it brought up.

    Unity do provide a notice that they're using third party code, and they are also distributing the library as a binary:
    https://docs.unity3d.com/Packages/com.unity.2d.entities.physics@0.2/license/Third Party Notices.html

    My question is, whether we as developers who distribute the same binary as part of our games, are also legally obligated to put that notice somewhere in our games, because the way I see it the answer is "probably yes" -- just because you built your game with Unity instead of manually adding Box2D as a dependency, doesn't mean you're magically not distributing it with your game.
     
    mahdi_jeddi likes this.
  8. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    9,725
    You don't need to talk to a lawyer and at this point I'm wondering how many people here who say "talk to a lawyer" actually have consulted lawyers over the things they recommend because unless they have a lawyer on retainer that's going to get pretty absurd pretty quick.

    Systems used internally by Unity and by Unity packages do not require you to take any additional steps to include licenses.
     
    DragonCoder likes this.
  9. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,084
    You wouldn't happen to have a source for this would you?
     
  10. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    9,725
    The source is that this is part of the licensing requirements on Unity's end, not the user's.
     
  11. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,084
    Yes, I fully expect that's how it works, but I would still love a source.
     
  12. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    9,725
    I don't know how to tell you this, but there isn't really going to be one. This is just how license requirement provenance is going to work in this situation.
     
  13. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,084
    Which means that the response for people who must know is still going to be to get a lawyer. While I'm not a fan of the GPL licenses one of the advantages with them is the FSF's enormous FAQ answers pretty much everything you could think to ask.
     
  14. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    9,725
    The absurdity of the application of "ask a lawyer" on these forums is getting out of hand and only leads to more paranoia over what actually requires a lawyer. You don't need a lawyer to tell you "yes, you can distribute a game as is using Unity" because otherwise no games would use the engine at all.
     
  15. UhOhItsMoving

    UhOhItsMoving

    Joined:
    May 25, 2022
    Posts:
    68
    https://unity.com/legal
    If it were required, either A) you would be told about it explicitly by Unity (e.g. in the Terms of Service), or B) it would be done automatically when you build your game.
     
  16. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    9,900
    If you have a legal question, you should talk to a lawyer. You shouldn't ask a coder about art (you can, but it won't be professional answer), you shouldn't ask a painter about coding and you shouldn't ask strangers on the internet about the law in your totally random jurisdiction.
    Also as great US of A situation, you should really avoid giving legal advice to anyone, it is illegal. It's called unauthorized practice of law. What constitutes practice or advice? That's an enormous gray area with many possible negative consequences.

    Saying ask a lawyer reinforces the idea that if you don't understand something, ask the proper professional. And helps with the jurisdiction issue as well.
    Not to mention having a lawyer nowadays is not that big of a deal in the US. You can have consultation hours built into a subscription and you can ask them about things whenever it comes up without costing an arm and a leg.

    But obviously to each their own.
     
    angrypenguin and neginfinity like this.
  17. Unifikation

    Unifikation

    Joined:
    Jan 4, 2023
    Posts:
    1,026
    Much more importantly, the maker of Box2D is probably one of the coolest and nicest people ever to grace game development with his presence.

    You can reach out to Erin Catto (Box2D creator) yourself, here:

    https://twitter.com/erin_catto

    And ask him anything yourself. And thank him!
     
  18. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    9,725
    No.

    This is an absolutely terrible approach to take. What you describe at the end there is having a lawyer on retainer which is an absurd thing to do, especially when these forums practically recommend consulting a lawyer before taking a dump. The question here, up front, does not require a lawyer and implying it should is patently absurd. Saying to ask a lawyer here is effectively saying "if you want to use the software as intended, consult a lawyer."

    You should consult a lawyer if the thing in question could get you in potentially substantial legal trouble. The worst case scenario here is that, even if you had to do this yourself, you'd just have to push a license.txt file out with your next update. Asking a lawyer is not something you have to do every step of the way with any legal question and, on top of that, people here have released games. They have released games using the 2D physics system. They will have this answer.

    It's like in the other thread about potentially competing with Unity. I saw people say "ask a lawyer" there too, but that problem ends up being that you will have to get pretty deep into specific legality and precedent, which is not something a lawyer will easily answer even with their resources. Asking a lawyer there also makes no sense. The people you need to ask in that situation are Unity themselves because they will be the most qualified to present what they view as competitive software.

    Also, I just want to zoom in on this a bit:
    This isn't correct. This isn't correct at all. Unauthorized practice of law specifically refers to giving this advice under the pretence of professional practice. It does not mean "you shouldn't give legal advice" but that you can't give legal advice in a professional context while presenting yourself as a lawyer, barrister, and solicitor.
     
  19. stain2319

    stain2319

    Joined:
    Mar 2, 2020
    Posts:
    415
    It seems like based on the information available there are 2 possibilities:

    1. This isn't required
    2. It's required, but no Unity game has ever done it in history, so every game ever released is in violation

    I don't know about you but #2 seems pretty darn unlikely to me.
     
    spiney199 likes this.
  20. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,317
    I'd say there's about 75% chance that #2 happened. I've seen commercial routers released with breach of GPL in their software.

    For a breach to matter someone has to sue, so a scenario where every single game in history was released in violation, but nobody sued, is quite possible.
     
    Ryiah and alexandervitkov like this.
  21. stain2319

    stain2319

    Joined:
    Mar 2, 2020
    Posts:
    415
    Possible, sure. 75% likely? I can't agree. I think it's very unlikely that every game ever released with Unity is violating a license and nobody ever noticed or cared. It's not impossible but I think it's very unlikely to be the case.
     
  22. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,317
    We'd have to agree to disagree here. In my opinion, 75% is a very conservative and overly optimistic estimate, because it is fairly common for people to forget about MIT license "notice" clause.

    Honestly, though, there's a ton of stuff included in video games by default.
    The common elements are FreeType2, zlib, libpng, libjpeg. In case of unity, IIRC libtheora.

    A lot of big budget titles actually go out of their way and list very single thing. But when was the last time you saw any of those libraries brought up in a unity game?

    Normally, it is a good idea for a game engine to include a file listing all the licenses used. But you know, at this moment I can't find a single mention of this sort of thing.

    Also, it would be a good time for a unity rep to step in and explain.

    P.S. Go into your unity install, search for *licens* file which include a word "notice". In my install I found 204 of those.
     
    oscarAbraham and Ryiah like this.
  23. Unifikation

    Unifikation

    Joined:
    Jan 4, 2023
    Posts:
    1,026
    Imagine if the free Unity popped up its logo and these licenses at startup, as a thank you to these services and features.

    And both premium and free versions provided a string based dictionary with a list of these to be easily incorporated into any credits and thank you screens we make in our games, and this dictionary be based on the Packages and plugins installed, too. Be nice and easy to make scrollers and credits.
     
  24. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    9,900
    Screenshot 2023-06-15 043928.png

    Leading to
    <editor install path>\<unity-version>\Editor\Data\Resources\legal.txt
    and
    <editor install path>\<unity-version>\Editor\Data\Resources\package_manager_TPN.txt


    Where
    <unity-version>
    is like
    2022.3.2f1
    , it's always in the Unity Editor install path when you install it through the Hub.

    Package documentations also usually have Third-party notices sections (example) and they encourage people who are building custom packages to also include them.
     
    Last edited: Jun 15, 2023
    Ryiah and neginfinity like this.
  25. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,317
    Good find, however, this is not a file for including into legal part of user's game.
     
  26. DragonCoder

    DragonCoder

    Joined:
    Jul 3, 2015
    Posts:
    1,453
    Just fyi, in case it has not been mentioned: As the owner of some IP or product, you can offer different licences to different people or companies as long as none contains some form of exclusivity clause. They do not need to be inherently compatible at all.
    Unity most likely has got such a specific licence from Box2D to avoid requiring all users of the engine to pass on MIT.
     
  27. Unifikation

    Unifikation

    Joined:
    Jan 4, 2023
    Posts:
    1,026
    Do you think they've offered any support to Erin Catto for this?
     
  28. DragonCoder

    DragonCoder

    Joined:
    Jul 3, 2015
    Posts:
    1,453
    Depends on how good at bargaining he is :D
    More typical is that the company asks the dev for help with integrating it into their product (for money of course) when it is a sizable sub-system like this.
     
  29. alexandervitkov

    alexandervitkov

    Joined:
    Dec 25, 2021
    Posts:
    5
    That would make sense, but I doubt that's the case, since here https://docs.unity3d.com/Packages/com.unity.2d.entities.physics@0.2/license/Third Party Notices.html they put the original MIT license with the attribution clause instead of "oh btw you can just use this :^), we've worked this out for you guys"
     
    Unifikation likes this.
  30. DragonCoder

    DragonCoder

    Joined:
    Jul 3, 2015
    Posts:
    1,453
  31. oscarAbraham

    oscarAbraham

    Joined:
    Jan 7, 2013
    Posts:
    431
    The current practice when distributing compiled software that contains code under a FOSS license is to include the required notices. The notices are usually included in a separate text file.

    I think it's always nice to consult a lawyer if one has the capacity to do so; it can be hard. I'm not sure it would solve this particular problem, though. I've read a good amount about FOSS licenses over the years. There are many different opinions published by competent lawyers, and a lot of it is still unclear. Also, current practices seem to be changing according to some.

    There haven't been many actual cases to test the limits and implications of FOSS licenses, especially small, non-copyleft licenses like the MIT one. These are cases where lawsuits would be difficult, and there's not a lot to gain. Plus, a lot of developers are happy to give attribution somewhere semi-hidden in the software when requested. Erin Catto got Angry Birds to credit him, even though Box2D's license didn't require it at the time.

    In the very specific case of Box2D, maybe you don't. Box2D didn't use the MIT license until version 2.4.0. I imagine Unity is using a modified older version, at least for the included non-entities functionality. Older versions were released under the zlib license, which doesn't require a notice when compiled.

    The Unity Engine may be using other software under licenses that require a notice, though. For example, PhysX 3.4 requires a notice. I imagine there may be a special deal with NVIDIA, but who knows. It'd be nice to know. And it'd be nice to have a list of FOSS projects that may be included in an application generated with Unity. It'd be even nicer if it was generated as a Third-Party.txt next to the executables. Regardless of the legal implications, it's nice to give proper credits to everyone.
     
    Last edited: Jun 16, 2023
    Ryiah likes this.
  32. oscarAbraham

    oscarAbraham

    Joined:
    Jan 7, 2013
    Posts:
    431
    I looked at this in Unity 2021.3. Many of those seem to be the sort of library that not used at Runtime, only in the Editor, for things like importing media files. Others may be obsolete, for example, the license for PhysX seems to be from a version that's older that the one currently being used. The copyright has a maximum date of 2016, but we're using at least PhysX 4.1, which is newer and has this license. Maybe Unity needs to update these files.
     
    Last edited: Jun 16, 2023
  33. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,503
    Right, but for a complete rookie, how do they know the difference between that and anything else?

    It's not the question which "needs" the lawyer, it's the person doing the asking.

    Most questions asked here are covered by the license, or by something else which can equally well be found and read to get a direct or near-direct answer. From that perspective, I agree completely, the question doesn't need a lawyer. The thing is that people asking the questions can't confidently get an answer for themselves for some reason or another - lack of familiarity with the basic concepts, not having the high level of reading comprehension skill required, lack of confidence, maybe not native English speakers, lack of time / desire, etc.

    I'm not confident that I can overcome that stuff to write an answer which is both accessible to the person who is asking and still unambiguously correct. There are good reasons that this is a profession in its own right.

    Even when I can give a solid answer I'm confident in, much of the time the legal-type questions asked around here get given a variety of conflicting answers. How does someone who couldn't find the answer for themselves know good advice from bad? Hmm, well, there are professionals for that.

    Unfortunately, even when the answer is actually pretty simple, if it really matters to someone who can't reach it themselves, then that's the main way they can get an answer they can be confident in. And if it doesn't really matter then they're not going to spend the money on it, which I expect is usually the case for most of these questions.
     
    Last edited: Jun 17, 2023
    Ryiah likes this.