Quantcast
Channel: Latest Questions by soft_sound
Viewing all articles
Browse latest Browse all 30

Unity output text file or other file type

$
0
0
I have been struggling to get some old code to work in Unity 5 after upgrading. It seems some major changes have been put in place with I/O and I was wondering how to do this in modern Unity. In the past I could use this: System.IO.File.WriteAllText(Application.dataPath + "/" + textName + fileExt, text); Then I found I could almost use this: string fileName = "Resources/mytext.txt"; StreamWriter stream = File.CreateText(fileName); stream.WriteLine(SaveString); stream.Close(); But I can't seem to get any write functions to work anymore. I'm using Unity 5.3.2p2 if that helps. I'm getting errors that these write methods no longer work. What is used instead?

Viewing all articles
Browse latest Browse all 30

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>