Texture to Advanced

is it possible to set texture type to advance and enable the Read/Write box at run time
as my texture is downloaded from server at runtime and I have to add polygon collider
in it

Texture2D sprites= Resources.Load("lev1/"+name*, typeof(Texture2D)) as Texture2D;//print (sprites);*
  •  		Sprite sprite2 = Sprite.Create(sprites,new Rect(0,0 , 1024f,1024f),new Vector2(0.5f, 0.5f),50f);*
    
  •  		path.sprite = sprite2;*
    
  •  		path.gameObject.AddComponent<PolygonCollider2D> ();*
    

this code work fine for editor but for mobile device its not adding collider then I found out I have to enable Read/Write of the texture …at runtime
any help

you dont need to add read/write from inspector only, you can work around with loading data from data path

using UnityEngine;
using System.Collections;
using System.IO;
//using UnityEditor;

public class test : MonoBehaviour {
//	public Texture2D texture;
	public Sprite render;
	public TextMesh text;
	// Use this for initialization
	Texture2D myTexture;
	string  url = "https://dl.dropboxusercontent.com/u/77837106/a.png";
	
	IEnumerator Start()
	{
                  //load .png data from server 
		WWW www = new WWW(url);
		yield return www;
		myTexture = www.texture;
//		myTexture = Resources.Load<Texture2D> ("a")as Texture2D;;//omit extension

		if (Application.platform == RuntimePlatform.Android)
		{ 
			// writing to android data path
			File.WriteAllBytes(Application.persistentDataPath + "/ab.png",myTexture.EncodeToPNG());
			yield return new WaitForSeconds(1);
		}
		else
		{
			//  write png data   

			File.WriteAllBytes(Application.persistentDataPath + "/ab.png",myTexture.EncodeToPNG());
			yield return new WaitForSeconds(3);
		}
		
		//now read the same tezture dependiong on paltefrom
		if (Application.platform == RuntimePlatform.Android)
		{
			WWW www2 = new WWW(@"file://"+Application.persistentDataPath + "/ab.png");
			yield return www2;
			myTexture = www2.texture;

		}
		else
		{
			WWW www2 = new WWW("file://" +Application.persistentDataPath + "/ab.png");
			yield return www2;
			myTexture = www2.texture;
		}
		
		//create texture from it
		 make_sprite_atruntime  ();
	}
	
	
	 
	void make_sprite_atruntime  ()
	{
		// now  myTexture  can be used any way you like ,you can compress it re-size it anything 
		GameObject gb = new GameObject ();
		gb.AddComponent <SpriteRenderer>();
		Sprite sprite = Sprite.Create (myTexture,new Rect(0,0,1024f,1024f),new Vector2(.5f,.5f),100);
		gb.GetComponent<SpriteRenderer> ().sprite = sprite;
		gb.AddComponent<PolygonCollider2D> ();
		if (gb.GetComponent<PolygonCollider2D>()) 
		{
			text.text = "hurray !! collide is there";
		}
             else
             {
                    text.text = "NO colider  ";  
             }
		 
	}
	
	
}