Search Unity

License on code in forum posts

Discussion in 'General Discussion' started by SorraTheOrc, Jul 22, 2019.

  1. SorraTheOrc

    SorraTheOrc

    Joined:
    Jun 11, 2016
    Posts:
    208
    I've found some really useful code in the forum that creates an expandable attribute for Scriptable Objects. I'd like to use it in my project. However, I can't seem to find any reference to the license for content in the forums.

    I assume that this was covered in the terms I didn't read when signing up to the forum ;-) but I can't find those terms now.

    Can anyone point me in the right direction?
     
  2. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,664
    Unless stated otherwise by the creator of it, you're free to use it in your project.
     
  3. Socrates

    Socrates

    Joined:
    Mar 29, 2011
    Posts:
    787
    Why not send a forum PM to the person who posted it and ask permission? That way you've gone the extra step to make sure you are covered for using the code.
     
  4. SorraTheOrc

    SorraTheOrc

    Joined:
    Jun 11, 2016
    Posts:
    208
    That's what I would hope, but unless it's actually documented somewhere the lawyers won't accept that. Does anyone know where the terms of use and licensing info for forum posts is?
     
  5. SorraTheOrc

    SorraTheOrc

    Joined:
    Jun 11, 2016
    Posts:
    208
    There are a number of people who contributed code in the thread and to date three of them have not responded to PMs :-(
     
  6. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,155
    Check when they've last logged on (you can do this by clicking their name). If the thread is an old one it's very likely that the posters no longer log onto the forums.

    To my knowledge this isn't covered by the terms of the forum nor would I expect it to be.
     
    xVergilx likes this.
  7. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    Took me 30 seconds to find it via google.
     
  8. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,145
    You can use code from the forums just fine, no repercussions. If you couldn't, the entire scripting forum would be shut down.
     
  9. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Ah cut and paste code projects
     
    Joe-Censored likes this.
  10. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,155
    You just read the title and posted, didn't you? :p I'm fairly certain they're looking at the following code snippet and wanted to know what license it's under. It's a fairly good script if you use SOs a lot as it lets you expand them without defocusing the object you're currently working with in the Inspector. Only downside is it's a bit heavy on performance.

    https://forum.unity.com/threads/edi...object-inspector-editing.484393/#post-3435162
     
    Last edited: Jul 22, 2019
  11. Zarconis

    Zarconis

    Joined:
    Jun 5, 2018
    Posts:
    234
    If you don't wanna use pre-made code you're on the wrong forum chief, you'd be best served by creating your own engine and graphics API.
     
    Ony likes this.
  12. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Nah, I ment taking code and trying to cut and paste togehterr a project
     
  13. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    There is a difference reusing code for your domain or writing your own game engine. We even have one code asset in our game. But it's alot different from cut and pasting togehter a game. I have never heard of that being a successful model
     
  14. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,770
    It would be useful, if you stick to the thread, rather than usual derailing. OP is clearly discussing script, not full project, if that matter at all. Also OP is learning. Consider tutorials as an example.
     
  15. MrArcher

    MrArcher

    Joined:
    Feb 27, 2014
    Posts:
    106
    I'm not a lawyer, but I was curious myself so I did a deeper dive. If you could link to the specific thread that'd be more helpful in deciding whether the wording of the post implied that it was free for public use.

    The forums are covered by Unity's terms of service [1], and the terms themselves are expanded upon in the Site & Communities Additional Terms (linked below). Contrary to the opinions posted above, forum-posted content defaults to belonging to the person who posted it.

    This is further expanded upon in the Unity Website and Communities Additional Terms:

    That said, the code may have an implied license, depending on the wording of the post. But your best bet legally is to get expressed permission from the post authors, or have a lawyer look at the wording of the post itself.

    See these discussions on stack exchange that talk about the issue. As far as I could tell from Unity's Terms, the only way the terms affect the copyright is that you give Unity the right to use and redistribute your code, not necessarily other users unless stated explicitly.

    If you're wondering whether you'll be OK to use someone's posted code, the answer is probably* yes. This area of law is largely without precedent, meaning it'd be incredibly expensive and difficult to pursue legally. Nobody's going to come after you for having some copy-pasted code in your game so long as that code was made publicly available, and you're not planning on posting the source code and claiming it as your own. And depending on the wording of the post, the licensing may be implicit anyways.

    *This is not legal advice, talk to your lawyer if you're still not sure. There's one on twitter who's pretty responsive.
     
  16. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,610
    It would have been good advice if you explained why such approach is a bad idea and then explain how to do it properly.
     
  17. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,770
    The closest info I can find now, is (Last Updated: September 7, 2018)
    "
    I visit the Unity website, what should I know?
    We collect log info, including IP address and device data, related to your visits to our site. When you post comments on our community pages and forums, other forum users will be able to see your username, photo and comments. When you post, you should assume that all the information you provide is public.
    "

    https://unity3d.com/legal/privacy-policy

    I suppose, it can be interpreted that content can be copied, shared and reproduce by anyone.
    Just like any social media / videos / images, unless otherwise stated.
     
  18. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    I did that, you can not know the quality of the code, plus even if it's quality code and you copy paste all over the place the end result will not be pretty, it should be self explanatory
     
  19. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    It's covered under intellectual property rights, which is a link on the right at the top of the terms of service. You won't find talk about licenses because that would make absolutely no sense. Even some deductive reasoning tells you that. And any attorney would immediately understand the implications.
     
  20. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,770
    Link would be nice, so here it is
    Unity Terms of Service
    • 4. Intellectual Property Rights
    "
    4.2 Your Content
    As between you and Unity, you own all right, title and interest (including, all intellectual property rights) in and to the content you create using the Software, Developer Services and/or any content you post to the Site or in the Communities (collectively, “Your Content”) (other than any components of the Software contained therein or used in connection therewith).
    "
     
  21. Ony

    Ony

    Joined:
    Apr 26, 2009
    Posts:
    1,977
    How do you go from someone asking about the legalities of using code snippets from the forum to assuming they are simply cutting and pasting a game together? Is that a thing only you seniors do?
     
    Baste, tcmeric, SparrowGS and 14 others like this.
  22. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    @Ony, I think you are mistaking the word senior here. The connotation is clearly, "old, forgetful, and liikely to exhibit signs of dementia."

    That is obvious. :)
     
    Baste, SparrowGS, Socrates and 6 others like this.
  23. frosted

    frosted

    Joined:
    Jan 17, 2014
    Posts:
    4,044
    I think anders has decided to embrace his trollish side. The new avatar picture with the hilarious handkerchief is probably to chosen to solidify his elitist persona for maximum trigger. He's taken to being provocative for the sake of it.

    A while back I remember him being strongly opinionated but more in the 'reasonable' range. Not sure when it flipped, but it definitely feels like he's become almost a caricature of himself over time.

    No offense @AndersMalmgren :p
     
  24. Ony

    Ony

    Joined:
    Apr 26, 2009
    Posts:
    1,977
    To be honest I actually like the handkerchief (and I like seeing people's faces so I know who I'm talking to). So I'm not going to fault him for that. The purposefully chosen stylistic flair is nice. :)

    Whether it's trolling or not I'm not sure, but he does seem to come across somewhat more heavy-handed lately. Not even sure if he's reading this or if he's already blocked me, but I totally support being yourself, even if that means not holding back from how amazing you think you are. If you start openly insulting other people to make that point, though, that's where it rubs me in places I'd rather not be rubbed. I mean yes, my replies can also be insulting, I get that.

    I was about to tag him and say "love ya, @AndersMalmgren!" but it won't let me tag him, so yeah I think he blocked me. o_O

    Anyway, back to the point of the tread!
     
    Last edited: Jul 23, 2019
  25. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,770
    What do you mean by "tag"? Is there anything like such feature here?
     
  26. Ony

    Ony

    Joined:
    Apr 26, 2009
    Posts:
    1,977
    When you type @ it pops a list up of user's names, and you can click one to tag them. Or simply type it like @Antypodish, and it will link it. If someone has blocked you it won't. In my post, from where I'm sitting, the @AndersMalmgren I typed is not a link, it's just text. For you it's probably a link because (likely) he hasn't blocked you.
     
    Antypodish likes this.
  27. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,770
    Oh I see. Didn't know that, even I use often this form of tagging.
    Well, that sadly may be the case for you then.
     
  28. iamthwee

    iamthwee

    Joined:
    Nov 27, 2015
    Posts:
    2,149
    Yup that's the same excuse I use when searching and sourcing pictures on google images.
     
  29. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,770
    Doesn't mean resources are not licences
    upload_2019-7-23_20-3-12.png
     
    SparrowGS, Ony and iamthwee like this.
  30. iamthwee

    iamthwee

    Joined:
    Nov 27, 2015
    Posts:
    2,149
    Oh wow I never even knew they had that option. Still shame all the reuse images suck.
     
  31. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    9,051
    Pretty much this.

    Most of the time you can't copyright code (or more practically, defend a copyright of code). 99.9% of the code posted here in the forums are snippets, or very short chunks, and mostly posted to help people or people seeking help. (copying broken code is a poor strategy). The context of the how the code is posted is usually a pretty clear indicator. As @Murgilod pointed out, that is pretty much the reason forum exists.

    Really the only exception to this would be if the code was posted without permission, this happens from time to time, a user looking for help will post whole files from an asset to show where the problem is. This is not allowed, and we remove it when it happens, but the context should be clear. If someone posted their own code on a public forum, their intent is clearly to share. Go for it.
     
    tcmeric, Joe-Censored, Kiwasi and 3 others like this.
  32. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    "You either leave #general a hero, or you stay long enough to see yourself become the villain."
     
  33. Zarconis

    Zarconis

    Joined:
    Jun 5, 2018
    Posts:
    234
    Well it is the respectful (most of the time) troll forum and in the years I've been here it's never been any different (actually seems a little more dull than it used to be), half the time even the mods join in. Game dev is serious work, it's nice to blow of some steam here as long as it refrains from becoming malicious.
     
    Martin_H and Ony like this.
  34. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Think through the practicalities of defending code shared in a forum post for a moment. Do you really think a lawyer and court is going to take you seriously when you say "I posted a twenty line snippet of code on the forums, as an example to help people learning to code. One of the people learning to code had the audacity to actually use my snippet. I want to sue him for copyright infringement." Its not going to happen.
     
  35. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    People have sued for way dumber reasons.
     
    Ony likes this.
  36. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,770
    I got your point.
    But wouldn't be technically the same case, with lets say youtube videos? What different is here?
    Equally I can decompile code from a game / software. Yet, they tend to be copy righted etc.
    I may miss something of course.
     
  37. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    Whatever you are doing, if it is suspect, make sure you're not gonna get caught. Soon as a lawyer is involved everybody loses.
     
  38. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    9,051
    It should be noted that said user is on a temporary time out, so their account functions as if they have been banned.

    ----

    PSA : It might be a good time to issue a reminder... while we do, from time to time, ban a user outright for certain types of behaviors, any user can effectively get themselves temporarily banned repeated violating rules. We give warnings for things like trolling and name calling when they aren't flagrant or major. Warnings add up. You get enough warning points and the forum software temp bans you (currently, rules are subject to change). So consider this when you are posting... Am I being an ass? Have I been warned for being an ass recently? Can I still contribute to this discussion without being an ass? The choice is yours.
     
  39. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Would be a serious dirt bag who would post code on a public programming forum, then file a lawsuit against anyone who used it. The only concern I'd have is if the poster wasn't the creator of the code.

    Even then, since game dev projects usually ship a build instead of the source code, the forum poster would have a very difficult time making the case that you actually did use their code verbatim. Copyright doesn't protect against code which functions similarly, that's the realm of patents.

    IANAL
     
    Zarconis, Kiwasi and Ony like this.
  40. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    That's only one aspect of the potential risk, though. The other aspect is that, if you're trying to sell your IP or business or maybe try to get a publisher, when potential buyers do their "due diligence" one of the things they probably care about is "chain of title" for everything incorporated into your product. If you've got lots of stuff from 3rd parties with no clear licensing information it might not be a deal breaker, but it's definitely not a good look.

    Personally, if I use code or an algorithm I found online, or have made heavy use of a particular resource in a particular piece of my code, I reference it in the comments. As well as the above it also just makes the design more clear.
     
    Socrates, Ony and Antypodish like this.
  41. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,770
    I had similar thought. But more regarding case, if someone else post the code, which original was initially not licenced for example and then original status has changed, while copy left on the internet with old status (free to take).

    But similar things happen in imaging art world, where people leak their images work, then wait certain time, and then hunt for places, where the image appeared, to claim whats theirs. Fairly easy this days to search online for similarities. Nasty ...
     
    Joe-Censored likes this.
  42. frosted

    frosted

    Joined:
    Jan 17, 2014
    Posts:
    4,044
    For the record. I actually like @AndersMalmgren even if he can be kinda trolly. He never backs down from an argument, and he is willing to show his code. I respect both of those points.
     
    Martin_H and Ony like this.
  43. Ony

    Ony

    Joined:
    Apr 26, 2009
    Posts:
    1,977
    that's exactly what I do as well. Just a quick comment at the top saying who made it and the URL where I found it.
     
    Antypodish likes this.
  44. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    9,051
    That is a terrible, terrible, terrible personality trait in anyone, especially when one is wrong or just posting nonsensical garbage or something that is opinion. There is nothing respectable in that. If you can't make a convincing or logical argument, repeating louder and calling people names doesn't win your case, it makes you a troll. We don't need trolling here, this is a place to learn and share and exchange ideas.
     
  45. Ony

    Ony

    Joined:
    Apr 26, 2009
    Posts:
    1,977
    group hug
     
  46. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    9,051
    Ditto. Mostly out of laziness. If it is networking or something that I normally don't do a lot of, and it breaks due to an update, often the author has updated before I have. Saves me time. ;)
     
    Martin_H and Ony like this.
  47. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,770
    Yep that does work, as long code is maintained by author:)
     
    zombiegorilla and Ony like this.
  48. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    Indeed. Some of the moments which have most built up my respect for others have been the points where they have explicitly backed down.
     
    Ryiah, Martin_H, Ony and 2 others like this.
  49. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,770
    Where did you dig this out? I mean, it fits so perfectly, but did you search for all possible complexes? :D
     
  50. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    I can't speak for penguin, but some of us have had to overcome our own God complexes. Which makes it relatively easy to see the same thing in others.

    Maybe its a cultural thing, but saying someone has a "God complex" is quite common over here.
     
    Ryiah, Martin_H, Ony and 2 others like this.