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

查看全文
  • 相关阅读:
    Linux命令之cat
    Linux命令之diff
    Linux查看内核信息或系统信息
    Linux命令之touch
    linux脚本:shell, 判断输入参数的个数(命令行)
    c++中try catch的用法
    linux命令:ftp
    linux shell种类
    linux shell脚本:在脚本中实现读取键盘输入,根据输入判断下一步的分支
    c语言,gdb
  • 原文地址:https://www.cnblogs.com/ldxsuanfa/p/10713104.html
  • Copyright © 2011-2022 走看看