Created
November 3, 2023 11:49
-
-
Save sudotman/8cd6c17fc85809998a962af1b2ab8c09 to your computer and use it in GitHub Desktop.
Unity - Create a file in a custom folder on the Desktop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if(!Directory.Exists(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Desktop) + "\\ISROResults")) | |
| { | |
| Directory.CreateDirectory(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Desktop) + "\\ISROResults"); | |
| File.Create(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Desktop) + "\\ISROResults\\results.txt"); | |
| } | |
| File.WriteAllText(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Desktop) + "\\ISROResults\\results.txt", "Test1"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment