Hello forum,
I’m quite new on using Unity and i’m having troubles on some things, mainly about file reading.
I would want to know, if possible:
1º How do you make a pop-up window that asks you for a string/filename? (Or better, a file browser window where you can select a file).
2º For the structure of the file, i want it to be something like this(but not exactly like this):
[A1]
Sound="SoundA1.wav"
Image="A1.jpg"
Image_Final="A1_Final.jpg"
ImageB="B1.jpg"
ImageC="C1.jpg"
Top_Row=X,A4,X
Middle_Row=A2,X,X
Bottom_Row=A2,A3,X
[A2]
........
[A3]
.......
--------
[AX]
.......
Knowing that it can have any number of [AX], how do i read the file with that structure and store the variables? Is it better to read all of it at the start and store all the variables(I was thinking of storing all the data in separate arrays, one for sounds, one for images, etc, or is there a better way to store variables?), or read them when needed?.
Notes:
-The 3 rows will all be stored on the same array. (for example, array [“A2”(2)] [“1ºposition of middle_row”(3)]=“A5”)
-The program doesn’t write the file, only reads them.
-Performance issues are not a big problem for this project, since its for research purposes.
3º The file is in “.txt” but i’ve been reading that “.XML” is better at storing and reading variables. Which format should i use?
Thank in advance for the help.