zoukankan      html  css  js  c++  java
  • Unity3d GUI适应分辨率

    float sourceWidth = 1024f;
        float sourceHeight = 768f;
        float m_fScaleWidth;
        float m_fScaleHeight;
    
        void OnGUI()
        {
            m_fScaleWidth = Screen.width / sourceWidth;
            m_fScaleHeight = Screen.height / sourceHeight;
            GUI.matrix = Matrix4x4.TRS(new Vector3(0, 0, 0), Quaternion.identity,new Vector3(m_fScaleWidth, m_fScaleHeight, 1));
    
            GUI.Button(new Rect(0, 0, 1024, 768), "");
        }

查看全文
  • 相关阅读:
    JVM调优--常用JVM监控工具使用
    jvm启动常用参数配置
    公钥和私钥原理
    tcp三次握手四次挥手
    内存泄漏和内存溢出
    hashmap解析
    Visual C++ 6.0 断点调试记录
    C++中输入一组不确定长度的数
    异或
    NULL与nullptr
  • 原文地址:https://www.cnblogs.com/ldxsuanfa/p/10713104.html
  • Copyright © 2011-2022 走看看