Load texture on disabled GameObject

I’m using the following script to download textures from a URL and apply them to GameObjects, the script is on each GameObject that requires a texture:

public class LoadTex : MonoBehaviour {

	public string url;

	IEnumerator Start()
	{
			WWW www = new WWW(url);
			yield return (www);
		Renderer renderer = GetComponent<Renderer> ();
		renderer.material.mainTexture = www.texture;
		}
}

This works great on GameObjects that are active on start up but when I turn on a GameObject during runtime, it shows no texture.

Why is this and how do I fix the issue?

Good day @hollym16 !

As Unity explains…

Making a GameObject inactive will
disable every component, turning off
any attached renderers, colliders,
rigidbodies, scripts, etc… Any
scripts that you have attached to the
GameObject will no longer have
Update()

If a GameObject is

 SetActive(false)

All its components remain inactive, so you can not modify any porperty, laod textures… nothing.

You only need to

 SetActive(true);

do all you want, and again

 SetActive(false)

Upvote & ask for more info using @tormentoarmagedoom

Bye:D