playMaker

Author Topic: Web Request file types  (Read 1321 times)

Maxi

  • Playmaker Newbie
  • *
  • Posts: 41
Web Request file types
« on: December 29, 2019, 06:45:01 AM »
Hi,
I'm trying to get the Web Request action to work and I understand it mostly. I can download text files into the 'Store Text' variable but I don't understand the 'Save in file' value. I want to download an audio file from my server but if I try to save it via 'save in file' I get the error message: "Path is empty".
Do I need to create a file with the name of the 'save in file' variable beforehand? It would be great if I could just save the file with the name given in 'Save in file' or if I could choose different variable types (like object>audio clip) in the field.

Does anyone know the problem, any help would be appreciated?

Maxi

  • Playmaker Newbie
  • *
  • Posts: 41
Re: Web Request file types
« Reply #1 on: December 29, 2019, 07:04:33 AM »
Ok, I was a bit too quick with this request, though I have another problem:
I realized (probably through writing this) that the 'save in File' string represents a path to a location as to where the file should be saved. But now, if I try to save it to my computer I get 'Access denied' and generally I dont want to have a specific path but I want to save it in the project so I can use it immediatly. Is there a way to do that?

Thanks

Maxi

  • Playmaker Newbie
  • *
  • Posts: 41
Re: Web Request file types
« Reply #2 on: December 29, 2019, 08:46:34 AM »
Sorry for the Spam; next Update:
I have realized that the 'Save in file' string is a path and a file name so I managed to download the file, but it has no File type and is not recognized by Unity. How can I save the file in a variable now? Or should I try to add a DownloadHandlerAudioClip Method to the Action?

PlaymakerNOOB

  • Full Member
  • ***
  • Posts: 219
Re: Web Request file types
« Reply #3 on: January 03, 2020, 12:19:19 PM »
Couldnt you name the filepath: downloads\DownloadText.txt

This should give the file a .txt extension which Unity should see and could import with datamaker