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), "");
        }

查看全文
  • 相关阅读:
    datetime和time的时间戳用法
    ER图
    python update()
    理解JWT(JSON Web Token)认证及python实践
    python lambda匿名函数 用法
    flask_restful(转载)
    Flask-SQLALchemy
    创建只有一个元素的元组
    MySQL安装过程中显示无法启动
    聚类
  • 原文地址:https://www.cnblogs.com/ldxsuanfa/p/10713104.html
  • Copyright © 2011-2022 走看看