What is default license of code snippets on Unity Answers?
Is it the same license as in Stack Overflow, which means all code snippets posted since 2016 are under MIT lincense?
I've never seen anything about a license. It's possible there isn't one.
Answer by Bunny83 · Jan 20, 2020 at 02:39 AM
In the past Unity Answers used the stack exchange engine line stackoverflow. So in the past the default license was the same as the stackoverflow license which is still a Creative Commons Share Aliike. The same is mentioned in the help section of stackoverflow.
Since 2016 stackoverflow released all code snippets under
a butchered MIT license
. As mentioned below SO actually still uses CC BY-SA, though that's irrelevant for UnityAnswers
However that all doesn't apply to Unity answers anymore. Unity answers does not use the stack exchange engine anymore but the answerhub engine from dzone. As far as I know there is not explicitly specified license for usercontent. That essentially means you can not assume anything, neither as reader / user of provided content nor as poster of content.
Though since Unity answers is mainly a place to answer question for the whole community I would generally assume:
People who post answers with code snippets are willing to share that code with the community. So it's reasonable to assume the poster doesn't want to apply any copyright claims to that code.
People who post questions which include parts of their code might not want the community to use that code since the point of providing the code was not to help others. The only purpose was to clarify the question context.
Note that those are just my interpretations. I'm not a lawyer and can't give legal advice. Though from a legal point of view nothing of the above can really be justified. Since no license has been specified we simply don't know what intentions the author had. If in doubt I would advice to just contact the author through the forum by starting a new conversation and ask for a concrete license or permission. Maybe the author can mirror the code on github and attach a proper license there.
Just to further clarify: Any code I've posted here on UA is free to use without any restrictions from my side. Though I've posted some code on github. Over there I almost always use the MIT license which is usually included in the source file itself.
Finally I would generally advice to not "copy" any code / code snippets. Unity Answers is a knowledge base. So you should use the questions and answers to gain knowledge how certain problems can be solved. So your aim should be to understand how the solution works and then apply that idea to your concrete problem. Most of the snippets posted here are even below trivial. Just yet another fisher-yates-shuffle or the default min / max sorting logic.
Just a quick comment on this. Stackoverflow does not release code under $$anonymous$$IT and never has. The proposal was indefinitely delayed. Its still CC BY SA.
Right, that can actually be read on the actual licence page of SO I've linked in my answer ^^. Even this is completely irrelevant for the question (since UA has no affiliation with SO), I've edited my answer to avoid confusion.