位置: 编程技术 - 正文

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(动态创建菜单)

  • 企业税后利润留用比例怎么算?
  • 应收利息增加会计分录
  • 企业所得税滞纳金从什么时候开始算
  • 住房贷款利息专项附加扣除是返钱吗
  • 事业单位未取得工资
  • 建筑安装业什么时候确认收入
  • 个人转让不动产给个人独资企业
  • 经营租赁融资租赁增值税税率
  • 企业向个人采购产品没有发票
  • 当月发货必须当月开票吗
  • 支票付款提示
  • 合同中的税费需要交税吗
  • 营改增劳务派遣
  • 开具发票财务需要管理吗?
  • 高危行业企业探索实行什么制度
  • 营增改后,建筑施工企业有哪些改变?
  • 出差伙食补贴没发
  • 政府补贴收入账户是什么
  • 出售原材料属于营业收入吗
  • 办公室装修合同印花税怎么缴纳?
  • 发票冲红后是否可以重开
  • 双倍余额法折旧率计算公式
  • linux批量操作工具
  • 质押的应收票据怎么做账
  • rmb转
  • Win11如何关闭屏保上的广告
  • 企业的工资薪金等现金支出只能通过什么办理
  • 劳务报酬所得缴纳时间
  • 分期付款购买固定资产折现率怎么算
  • yolov5最新版
  • thinkphp django
  • 第二季度企业所得税怎么计提
  • 移动端适配方案面试题
  • 应收账款贷款怎么做
  • 企业所得税季报资产总额怎么填
  • 材料采购是什么类科目
  • 什么是银行对账,进行银行对账分为几步
  • windows 和 linux
  • 工会经费的会计分录2022
  • 增值税退税流程怎么操作
  • 增值税纳税申报实训报告
  • mysql客户端程序的功能是什么
  • 预收账款可以用吗
  • 无销项税能抵扣进项税吗
  • 注册资本印花税2023年新规定
  • 纳税人及时提供信息
  • 存货核算方法有五种
  • 置换房产流程
  • 月末忘记结转怎么办
  • 开出发票后直接做账吗?
  • 诺诺开票人怎么修改
  • 工业企业的材料销售收入应计入什么
  • mysql判断字符长度
  • mysql中具体到删某一个数据
  • win10打开cad出现致命错误
  • solaris 11.4
  • win7右键管理工具
  • dotnetfx35有什么用
  • windows xp的电脑
  • 免费获取验证码
  • Omniserv.exe - Omniserv是什么进程 有什么用
  • win7怎么禁止网络连接
  • 2020win7免费升级win10教程
  • win7如何安装iis7.0
  • cocos2dx加libevent库
  • 计算机中丢失opencv_core249.dll
  • css下margin、padding、border、background和font缩写示例
  • IE、FF、Chrome浏览器中的JS差异介绍
  • Node.js中的包管理工具是什么
  • 安卓录制音频
  • js alert()
  • IndicatorTabBar——可滑动的带指示条的TabBar
  • ASP小贴士/ASP Tips javascript tips可以当桌面
  • 孙其功陪你学之——unity3d进程暂停
  • jquery+ajax+text文本框实现智能提示完整实例
  • 重新税务登记程序有哪些
  • 江西2022年选调
  • 江苏省内车辆迁入标准
  • 10%加计抵减政策条件
  • 云南国家税务网上开票赋码
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设