当前位置:   article > 正文

Unity 动态调整画面质量_unity代码设置真机画质

unity代码设置真机画质

Edit->Project Settings->Quality

  1. void Update ()
  2. {
  3. if (Input.GetKeyDown(KeyCode.Alpha1))
  4. QualitySettings.SetQualityLevel(0, true);
  5. else if (Input.GetKeyDown(KeyCode.Alpha2))
  6. QualitySettings.SetQualityLevel(1, true);
  7. else if (Input.GetKeyDown(KeyCode.Alpha3))
  8. QualitySettings.SetQualityLevel(2, true);
  9. else if (Input.GetKeyDown(KeyCode.Alpha4))
  10. QualitySettings.SetQualityLevel(3, true);
  11. else if (Input.GetKeyDown(KeyCode.Alpha5))
  12. QualitySettings.SetQualityLevel(4, true);
  13. else if (Input.GetKeyDown(KeyCode.Alpha6))
  14. QualitySettings.SetQualityLevel(5, true);
  15. }

0-5分别对应着面板由上而下的质量等级

 

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/思考机器3/article/detail/60348
推荐阅读
相关标签
  

闽ICP备14008679号