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

查看全文
  • 相关阅读:
    使用自制事务进行异常信息的记录:Autonomous transactionslog
    backup methodsexp and imp
    一个 SQL 同时验证帐号是否存在、密码是否正确
    使用存储过程进行分页:page by Procedure
    推荐一款类似于editplus的文本编辑工具:note++
    myeclipse8.5反编译插件的安装使用jdgui插件
    [转]JavaMail的使用之邮件发送 详解
    Thinking in java中内部类的例子。
    [转]tomcat6.0下的log4j日志文件配置过程
    127.X.X.X開頭的網路都是特殊用途的嗎!?
  • 原文地址:https://www.cnblogs.com/ldxsuanfa/p/10713104.html
  • Copyright © 2011-2022 走看看