Copyright Unity?

Hello everyone! This is where I ask the noobish question because I’m not exactly sure about copy right when it comes to source code. I am asking a simple question at least I think it is simple. I am wanting to know if a user were to copy a source code or for example C# or C++ into a game I created? Let’s say I made all the art, music, sound effects but did not write the code (in a bold sense “copied”. Can I be sued for using code from either Unity tutorial or another one somewhere else. Thank you! (I don’t believe in copying other peoples work.)

Definitely do not listen to FireStone’s response. While he’s probably correct that Unity’s supplied tutorials and material are free game, he is entirely incorrect that you should “feel free to use other people’s code.” A lot of code is licensed differently, a large amount of which requires that you use the same license, or at least retain a copy of that license with your distributed software. If you’re tinkering with no plans of releasing, then by all means, tinker away. But if you intend to release what you create, you need to be aware of the license and what it entails when you borrow someone else’s work.

Unity’s code and assets are all free to use, no one is gonna come to your house check your computer, and say nope you can’t type that. Most assets on the store are also free to use in your project although I don’t recommend it as that is why most games are labeled asset farms. Cause nothing was made by the creator and just stolen from other people.

Point is feel free to use others code, it’s less work for you.
Don’t just use others models or sounds unless A. You 100% know you can use it and that it fits in your game style and doesn’t look out of place.