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

查看全文
  • 相关阅读:
    第十七节:织梦做自定义表单在线预约的方法
    ExecuteNonQuery()返回值
    WCF服务编程读书笔记(6):错误
    ubuntu 工作区切换快捷键设置
    a pubhub service
    淘宝提供了Rubygems的国内镜像站点 ruby rails源
    新rails安装过程记录
    XMLRPC HOWTO
    XMLRPC HOWTO
    metaweblog api相关
  • 原文地址:https://www.cnblogs.com/ldxsuanfa/p/10713104.html
  • Copyright © 2011-2022 走看看