I have a doubt with the correct sintax of this JS sentence in C#:
remoteTexture = new WWW(remoteTextureURL);
yield remoteTexture;
How can i give the the same behaviour with C#?
I have a doubt with the correct sintax of this JS sentence in C#:
remoteTexture = new WWW(remoteTextureURL);
yield remoteTexture;
How can i give the the same behaviour with C#?
Something like this:
IEnumerator TheFunctionWaitingForWWW()
{
// ...
remoteTexture = new WWW(remoteTextureURL);
yield return remoteTexture;
// ...
}
You will need to call TheFunctionWaitingForWWW() using StartCoroutine, or it won’t work:
StartCoroutine(TheFunctionWaitingForWWW());
This is covered in the Scripting Reference’s entry for StartCoroutine.
Thanks!!! Its works!