- Home /
Question by
monsterlullaby · Sep 27, 2016 at 12:09 PM ·
textfile
'File' does not contain a definition for 'CreateText''
void Start () {
playerPositions.Add(this.transform.position);
if (File.Exists(fileName))
{
//Debug.Log(fileName + " already exists.");
//fileExists = true;
return;
}
sr = File.CreateText (fileName);
}
It had worked in the past but I'm not sure why it won't work now. :(
Comment
Answer by tanoshimi · Sep 27, 2016 at 12:11 PM
Did you name one of your scripts as File.cs, by any chance?
It was due to building for web player and not windows. Also you have to use the download assistant to 'tick them' on.
Your answer

Follow this Question
Related Questions
How does a TextAsset work? 1 Answer
Is this possible to work as a temporary storage? 2 Answers
*txt file outside of unity 1 Answer
Problem Reading A Text File 2 Answers