[HELP] Saving Image With an id

Hi, I would Like to know How to Save an image to the device with an ID?

scenario: I’m downloading 50 images from web and saving them on device.(images are small) but they are used frequently.( for each client the images are different).

So What I know so far is that i should be encoding the images to png (byte arrays). But how do I assign ids to the images?

would this method work? I’m new to file management kindly put me in the right direction please.

File.WriteAllBytes(Application.dataPath + “/Myimages/”+ID+“.png”, bytes);

If you want to save images to player’s device then store the files to persistentDataPath

i know but how do i save them with specific Ids

What you posted in the first comment should work. Have you tried it and found it to not work?

1 Like

I have yet to try it out. I just wanted to take opinions on how this is normally done.