What license to use for my codes.

Here’s my situation, I built a game composed of 30 C# scripts, I want to sell it, but I want to put a license first to the 2 C# script for security purposes.

So that I remain the owner/author of that 2 C# scripts and ables me to use it again to my future game project without getting sued.

What license should I use?

I’m not a lawyer, but as far as I’m aware you own all your works by default. I.e. you’re an author even if code doesn’t say it. A sole author also has the right to release code under any license they want. So, unless you sign agreement where you give rights to someone else, the scripts should remain yours.

1 Like

This isn‘t about „security“ it‘s about usage rights. :wink:

Selling on the asset store? All assets are governed by Unity‘s Asset Store EULA. You cannot add your own license terms, not even for individual files. Unless of course that makes the file less restrictive, meaning you can sublicense parts of your own asset under MIT License or Public Domain (CC0).

Other stores most likely have very similar conditions.

Selling on your website? Good luck with that. Probably zero sales for the longest time.

Selling to clients? Terms of use are governed by the contract. You may need a lawyer for this, or at least a template that contains the phrase that you retain all rights to the work you produce but the client receives all rights to use. If you restrict the client’s rights in any way (other than reselling the source project unaltered) this will often be in conflict with the interests of the client and raise questions.

Sell as a compiled game? No need to attribute any source files with license terms. These will not be included in compiled form.

2 Likes