//做宽屏遮挡的代码
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);
}

相关文章:

  • 2022-12-23
  • 2022-02-03
  • 2021-10-31
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-21
  • 2021-08-18
  • 2022-02-12
  • 2022-12-23
相关资源
相似解决方案