伪宽屏代码

//做宽屏遮挡的代码
var aTexture : Texture;//指定一张黑色贴图

function OnGUI() {
if(!aTexture){
Debug.LogError("Assign a Texture in the inspector.");
return;
}
GUI.DrawTexture(Rect(0,0,Screen.width,Screen.height/6), aTexture, ScaleMode.StretchToFill, true, 10.0f);
GUI.DrawTexture(Rect(0,Screen.height*5/6,Screen.width,Screen.height/6), aTexture, ScaleMode.StretchToFill, true, 10.0f);
}

posted @ 2011-09-16 11:50  softimagewht  阅读(232)  评论(0编辑  收藏  举报