How to make text remain txt in full Unity

Asked

Viewed 59 times

0

The idea is to create an entry where the user enters data and is registered in txt and can add other data as a simple schedule. The screen asks: type your name: Please enter your age: Enter your city:

save to txt and then add another data set. It is a way to record the input and persist the data. I have seen some solutions that are incomplete or confusing.

Grateful,

Eduardo

1 answer

0

I have worked with Unity but I never generated a physical text file on the device. Since it is C# you can try to generate the file with Streamwriter. See below:

StreamWriter salvar = new StreamWriter ("CAMINHO_DO_ARQUIVO ONDE SERÁ GERADO");

salvar.WriteLine("PASSE AQUI O SEU TEXTO");
salvar.Close();
  • But I don’t want to pass text. I want the person to pass the text and add without deleting what already exists. The tutorials I have seen save but delete the existing item. I want to persist all data row after row.

  • or better I want to add new data on the next line without deleting the existing one. So just record a text.

  • it would be like him to see if he already had a busy line so he would jump and register on the other line.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.