string bg = "";
switch (pBooth.level)
{
case 1:
bg = "T_SelectStone_BG_First";
break;
case 2:
bg = "T_SelectStone_BG_Middle";
break;
case 3:
bg = "T_SelectStone_BG_High";
break;
}
string path = System.IO.Path.Combine(Const.ATLAS_LOBBY_ICON_PATH, bg);
Texture2D myTexture = (Texture2D)Resources.Load(path);//使用Resources.Load动态加载当前图像
this.goBgPlane.GetComponent<Renderer>().material.mainTexture = myTexture;//将当前模型纹理进行修改