Generating a QR code with Unity and ZXing(zebra crossing)
Recently in a project of my internship, I need to use the unity to read a particular URL in a txt file, and generate a QR code with this URL. Reading a txt file and transfer its content into string seems easy, while I still encountered some problem. After browsed some tutorials, I know that I should save the file's path in a string, and use a StreamReader object to read the content in the file, and save them in a list of string. But found that if I use: path = "Assets/URL.txt" ; It would work in the unity editor undoubtedly, but if I build the file and run in windows OS, I found that I can not find that path anymore. Soon I found that I should build a StreamingAssets folder in the Assets Folder, and put the txt file in the new folder, use the Application.streamingAssetsPath + "file name" to access it. Each platform of builded unity exe program has unique file path, so that try to access a file with path "Assets/URL.txt" in a builded program is not...