- Home /
How to get the name of www.audioclip?
hi there..
I´m loading audioclips via WWW. Now i want to show the Filename with a UILabel (NGUI).
Problem. I don´t know how to get the name of the audiofile..
Does anyone know an answer?
Start with the url
. Go to the end of the string, and back up character by character until you get to the first (rightmost) forward slash. The move one character forward and that's the name of the audio clip
. (I don't think AudioClip.name
will have a value when you have WWW loaded an audio file.)
Answer by SkaredCreations · Mar 22, 2014 at 11:18 PM
Use System.IO.Path.GetFileName() of your URL ese you cannot know the extension of filename
Your answer
![](https://koobas.hobune.stream/wayback/20220613140925im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
www AudioClip returning incorrect length 1 Answer
www.getAudioClip() Bug: One Second being cut off MP3. 2 Answers
WWW Audio and PlayOneShot: Playing the same AudioClip Twice Cuts off First Instance 1 Answer
Audioclip from WWW.getAudioClip(...) never gets ready 1 Answer
How do i stream music from a server? 0 Answers