public static void LoadTexture(ref Texture2D tex, string fileName)
{
if (File.Exists(PlugInDataPath + fileName))
{
Debug.Log(String.Format("Loading Texture - file://{0}{1}", PlugInIconPath, fileName));
WWW img1 = new WWW(String.Format("file://{0}{1}", PlugInIconPath, fileName));
//Debug.Log("image loaded");
img1.LoadImageIntoTexture(tex);
//Debug.Log("image in texture");
}
else {
Debug.LogWarning("File does not exist: " + PlugInIconPath + fileName);
}
}