Hi there.
I created the method in SomeClass.
public IEnumerator GetLengthSoundFromURL (string url)
{
WWW www = new WWW (url);
yield return www; // (1)
// seconds
float length = audioClip.length;
// set to property there !!!!
SoundLength = length;
yield return null; // (2)
}
I call the method from other class.
private IEnumerator CallGetLengthSoundFromURL ()
{
yield return AudioSystem.Instance.GetLengthSoundFromURL (wavURL);
// it is old SoundLength data...
falot soundLength = someClass.SoundLength;
Debug.Log (soundLength);
}
But, the length’s data is old.
I guess it return from (1)
But, I want to it to wait until (2).
Could you tell me how to wait until (2) point?