QRCoder is a project by Raffael Herrmann that generates QR codes, and is licensed under the MIT license.
There is a Unity version of this library, but it is quite heavy because it uses NuGet and System.Drawing while this is all not necessary to just generate QR codes for use in Unity. This Lightweight version is pure source code you can put into your project to get a Texture2D for any QR code, without adding any libraries.
Put the QRCoder folder into your project's Assets folder.
To get a Texture2D for a QR Code to put onto a Material, you only need one line of code:
Texture2D qrTex = QRCodeHelper.GetQRCode("https://hello.world/", 8);
There are options for the ECC level, colors, and some others.
This bit of documentation from the original repository is also a useful read:
Technically QR code is just a visual representation of a text/string. Nevertheless most QR code readers can read "special" QR codes which trigger different actions.
For example: WiFi-QRcodes which, when scanned by smartphone, let the smartphone join an access point automatically.
This "special" QR codes are generated by using special structured payload string, when generating the QR code. The PayloadGenerator.cs class helps you to generate this payload strings. To generate a WiFi payload for example, you need just this one line of code:
PayloadGenerator.WiFi wifiPayload = new PayloadGenerator.WiFi("MyWiFi-SSID", "MyWiFi-Pass", PayloadGenerator.WiFi.Authentication.WPA);
To generate a QR code from this payload, just call the "ToString()"-method.
You can learn more about the payload generator in the QRCoder Wiki.
The PayloadGenerator supports the following types of payloads: