位置: 编程技术 - 正文

Unity3D导出exe窗口参数调整培训(unity导出exe文件)

编辑:rootadmin

推荐整理分享Unity3D导出exe窗口参数调整培训(unity导出exe文件),希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:unity如何导出exe,unity导出exe和原来不一样,unity导出exe和原来不一样,unity导出exe常见问题,unity导出成窗口游戏,unity导出成窗口游戏,unity导出exe常见问题,unity2019导出exe,内容如对您有帮助,希望把文章链接给更多的朋友!

欢迎来到unity学习、unity培训、unity企业培训教育专区,这里有很多U3D资源、U3D培训视频、U3D教程、U3D常见问题、U3D项目源码,我们致力于打造业内unity3d培训、学习第一品牌。

下面我们开始今天的Unity3D技能培训。 我们学习Unity3D培训目标:让U3D初学者可以更快速的掌握U3D技术,自行制作修改素材,可以独立完成2D、3D小规模游戏及网页游戏开发。

[csharp] view plaincopy

using System;

using System.Runtime.InteropServices;

using UnityEngine;

public class WindowMod : MonoBehaviour

{

public enum appStyle

{

FullScreen,

WindowedFullScreen,

Windowed,

WindowedWithoutBorder

}

public enum zDepth

{

Normal,

Top,

TopMost

}

private const uint SWP_SHOWWINDOW = u;

private const int GWL_STYLE = -;

private const int WS_BORDER = 1;

private const int GWL_EXSTYLE = -;

private const int WS_CAPTION = ;

private const int WS_POPUP = ;

private const int SM_CXSCREEN = 0;

private const int SM_CYSCREEN = 1;

public WindowMod.appStyle AppWindowStyle = WindowMod.appStyle.WindowedFullScreen;

public WindowMod.zDepth ScreenDepth;

public int windowLeft = ;

public int windowTop = ;

public int windowWidth = ;

public int windowHeight = ;

private Rect screenPosition;

private IntPtr HWND_TOP = new IntPtr(0);

private IntPtr HWND_TOPMOST = new IntPtr(-1);

private IntPtr HWND_NORMAL = new IntPtr(-2);

private int Xscreen;

private int Yscreen;

private int i;

[DllImport("user.dll")]

private static extern IntPtr GetForegroundWindow();

[DllImport("user.dll", CharSet = CharSet.Auto)]

public static extern bool SetWindowPos(IntPtr hWnd, IntPtr hPos, int x, int y, int cx, int cy, uint nflags);

[DllImport("User.dll")]

private static extern IntPtr FindWindow(string lpClassName, string lpWindowName);

[DllImport("User.dll")]

private static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong);

[DllImport("User.dll")]

private static extern int GetWindowLong(IntPtr hWnd, int dwNewLong);

[DllImport("User.dll")]

private static extern bool MoveWindow(IntPtr hWnd, int x, int y, int width, int height, bool repaint);

[DllImport("user.dll", CharSet = CharSet.Auto)]

public static extern int ShowWindow(IntPtr hwnd, int nCmdShow);

[DllImport("user.dll", CharSet = CharSet.Auto)]

public static extern int SendMessage(IntPtr hwnd, int msg, IntPtr wP, IntPtr IP);

[DllImport("user.dll", CharSet = CharSet.Auto)]

public static extern IntPtr SetParent(IntPtr hChild, IntPtr hParent);

[DllImport("user.dll", CharSet = CharSet.Auto)]

public static extern IntPtr GetParent(IntPtr hChild);

[DllImport("User.dll")]

public static extern IntPtr GetSystemMetrics(int nIndex);

private void Start()

{

this.Xscreen = (int)WindowMod.GetSystemMetrics(0);

Unity3D导出exe窗口参数调整培训(unity导出exe文件)

this.Yscreen = (int)WindowMod.GetSystemMetrics(1);

if (this.AppWindowStyle == WindowMod.appStyle.FullScreen)

{

Screen.SetResolution(this.Xscreen, this.Yscreen, true);

}

if (this.AppWindowStyle == WindowMod.appStyle.WindowedFullScreen)

{

Screen.SetResolution(this.Xscreen - 1, this.Yscreen - 1, false);

this.screenPosition = new Rect(0f, 0f, (float)(this.Xscreen - 1), (float)(this.Yscreen - 1));

}

if (this.AppWindowStyle == WindowMod.appStyle.Windowed)

{

Screen.SetResolution(this.windowWidth, this.windowWidth, false);

}

if (this.AppWindowStyle == WindowMod.appStyle.WindowedWithoutBorder)

{

Screen.SetResolution(this.windowWidth, this.windowWidth, false);

this.screenPosition = new Rect((float)this.windowLeft, (float)this.windowTop, (float)this.windowWidth, (float)this.windowWidth);

}

}

private void Update()

{

if (this.i < 5)

{

if (this.AppWindowStyle == WindowMod.appStyle.WindowedFullScreen)

{

WindowMod.SetWindowLong(WindowMod.GetForegroundWindow(), -, );

if (this.ScreenDepth == WindowMod.zDepth.Normal)

{

WindowMod.SetWindowPos(WindowMod.GetForegroundWindow(), this.HWND_NORMAL, (int)this.screenPosition.x, (int)this.screenPosition.y, (int)this.screenPosition.width, (int)this.screenPosition.height, u);

}

if (this.ScreenDepth == WindowMod.zDepth.Top)

{

WindowMod.SetWindowPos(WindowMod.GetForegroundWindow(), this.HWND_TOP, (int)this.screenPosition.x, (int)this.screenPosition.y, (int)this.screenPosition.width, (int)this.screenPosition.height, u);

}

if (this.ScreenDepth == WindowMod.zDepth.TopMost)

{

WindowMod.SetWindowPos(WindowMod.GetForegroundWindow(), this.HWND_TOPMOST, (int)this.screenPosition.x, (int)this.screenPosition.y, (int)this.screenPosition.width, (int)this.screenPosition.height, u);

}

WindowMod.ShowWindow(WindowMod.GetForegroundWindow(), 3);

}

if (this.AppWindowStyle == WindowMod.appStyle.Windowed)

{

if (this.ScreenDepth == WindowMod.zDepth.Normal)

{

WindowMod.SetWindowPos(WindowMod.GetForegroundWindow(), this.HWND_NORMAL, 0, 0, 0, 0, 3u);

WindowMod.SetWindowPos(WindowMod.GetForegroundWindow(), this.HWND_NORMAL, 0, 0, 0, 0, u);

}

if (this.ScreenDepth == WindowMod.zDepth.Top)

{

WindowMod.SetWindowPos(WindowMod.GetForegroundWindow(), this.HWND_TOP, 0, 0, 0, 0, 3u);

WindowMod.SetWindowPos(WindowMod.GetForegroundWindow(), this.HWND_TOP, 0, 0, 0, 0, u);

}

if (this.ScreenDepth == WindowMod.zDepth.TopMost)

{

WindowMod.SetWindowPos(WindowMod.GetForegroundWindow(), this.HWND_TOPMOST, 0, 0, 0, 0, 3u);

WindowMod.SetWindowPos(WindowMod.GetForegroundWindow(), this.HWND_TOPMOST, 0, 0, 0, 0, u);

}

}

if (this.AppWindowStyle == WindowMod.appStyle.WindowedWithoutBorder)

{

WindowMod.SetWindowLong(WindowMod.GetForegroundWindow(), -, );

if (this.ScreenDepth == WindowMod.zDepth.Normal)

{

WindowMod.SetWindowPos(WindowMod.GetForegroundWindow(), this.HWND_NORMAL, (int)this.screenPosition.x, (int)this.screenPosition.y, (int)this.screenPosition.width, (int)this.screenPosition.height, u);

}

if (this.ScreenDepth == WindowMod.zDepth.Top)

{

&

更多精彩请点击

NGUI动态创建UILabel 欢迎来到unity学习、unity培训、unity企业培训教育专区,这里有很多U3D资源、U3D培训视频、U3D教程、U3D常见问题、U3D项目源码,我们致力于打造业内unity3d

unity3d游戏开发之整合vs来加快unity c#开发 欢迎来到unity学习、unity培训、unity企业培训教育专区,这里有很多U3D资源、U3D培训视频、U3D教程、U3D常见问题、U3D项目源码,我们致力于打造业内unity3d

Unity3D如何有效地组织代码? 欢迎来到unity学习、unity培训、unity企业培训教育专区,这里有很多U3D资源、U3D培训视频、U3D教程、U3D常见问题、U3D项目源码,我们致力于打造业内unity3d

标签: unity导出exe文件

本文链接地址:https://www.jiuchutong.com/biancheng/372920.html 转载请保留说明!

上一篇:Unity3D游戏开发之如何用U3D截图的技能培训(Unity3D游戏开发毕业论文)

下一篇:NGUI动态创建UILabel(动态创建菜单)

  • 房产税出现往期数据怎么办
  • 什么是工程销项表
  • 企业银行贷款报表要求
  • 个税手续费发给个人怎么做账
  • 租金属于什么会计要素
  • 电子申报率较差的原因
  • 一般纳税人企业所得税政策最新2023税率
  • 汇兑损益需要缴税吗
  • 企业大股东减持股份
  • 前年度库存商品少结转业务怎么处理?
  • 挂靠被查出来后挂靠费怎么处理?
  • 研发支出费用化支出每个月都要结转吗
  • 境外服务收入免税范围
  • 企业销售净利润较低说明什么
  • 公司购房、售房需要缴纳哪些税?
  • 外资生产企业出口销售会计处理
  • 跨年度的应收账款少记了怎么办
  • 工程施工方安全责任
  • 费用化和资本化对利润的影响
  • 1697507802
  • 土地开发中三通一平
  • 生产企业出口需要什么手续
  • 股东房产无偿给公司使用协议
  • 厦门新车购置税计算
  • 计提的坏账准备可以转回吗
  • 王者荣耀中如何隐藏贵族标志
  • 购买办公桌会计分录
  • 报销培训费怎么做账
  • 企业开票附加税
  • 交际应酬费可以抵扣吗
  • uni-app实战教程
  • 不动产出租要交什么税
  • php比较大小
  • 解决的英文
  • 纯HTML+CSS小兔鲜儿网站首页(静态网页)
  • taskset 绑定cpu
  • discuz去除底部
  • 退预收款需要对方同意吗
  • 增值税专用发票有几联?
  • 一般纳税人专票认证抵扣流程
  • 会计人员信息采集工作证明模板
  • 异地预缴税款多交了有影响吗
  • 土增清算后再销售
  • 保险公司委托代征是什么意思
  • 出售固定资产应收账款
  • 公司给员工购买商业保险报销哪些
  • 进项税额转出是借方科目还是贷方科目
  • 个体户没有账
  • 一个人可以做多个担保人吗
  • 房屋租赁印花税计税金额含税吗
  • 进项税有余额在报表如何反应
  • 预缴增值税税款所属期
  • 公司进货厂家给开发票吗
  • 长期借款工程验收会计分录怎么做
  • 企业注销时应收帐款如何处理
  • 同城票据交换差额户金额从哪得来的
  • 公司里的废品的处理一般是谁负责
  • 电子发票开具流程?
  • win7 64位系统如何查看计算机名称为了应付某一操作
  • Red Hat Enterprise Linux 5.X的图形安装教程
  • win7系统怎么取消自动关机
  • win10预览版bug
  • win10快速隐藏窗口
  • red hat linux怎么用
  • win10系统自带杀毒软件
  • 宏基win8改win7
  • linux文件系统的根目录的i节点号为
  • 解决出现的问题下一句,欢迎的语气
  • jquery怎么获取
  • shell脚本读取ini文件
  • perl命令
  • Node.js中的什么模块是用于处理文件和目录的
  • jquery获取元素的父元素
  • 简述python语言
  • 广西税务局增值税发票查询平台
  • 个人所得税完税证明网上打印
  • 贵阳市税务局投诉电话号码
  • 增值税税控开票软件升级
  • 国有企业全面改革方案
  • 购房税率是多少
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

    网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

    友情链接: 武汉网站建设