位置: 编程技术 - 正文

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

  • 住宿发票税点为什么有6%和3%的区别
  • 资产负债表应交税费期末余额是什么意思
  • 公司购买车辆抵扣税
  • 小规模纳税人减征增值税
  • 小规模纳税人是个体户吗
  • 个人名义购房
  • 销售免税产品怎么做分录
  • 跨月收入账务处理
  • 罚款所得税调整
  • 增值税起征点有啥用
  • 企业现金股利的支付能力,在很大程度
  • 服务费公司的账务处理
  • 营改增之后就没有营业税了吗
  • 所得税预警税负率
  • 生产性服务业定义
  • 员工生育期间社保
  • 收取技术服务费
  • 在建工程预转固后又有工程款
  • 增值税专用发票使用规定 最新
  • 企业所得税税率2022年最新税率表
  • 安置房税金如何交
  • 技术服务费增值税申报表填写
  • 企业为职工缴纳的五险一金占工资总额的多少
  • 亨茨维尔机场
  • 个人所得税有哪些可以减免的项目
  • shell脚本攻略第三版pdf
  • 工伤补贴由谁发放
  • 挪威 北极熊
  • php中关键字修饰属性是什么
  • React常见面试题
  • vue的路由实现
  • 房贷计算器搜房网
  • 一键部署源码
  • linux symbolic link
  • 公司注销清算的会计分录
  • 研发支出放在资产负债表哪里
  • day29--Java泛型02
  • 没进项票
  • 企业初期面临的主要问题
  • web cms漏洞
  • mongodbwindows安装
  • 投资款印花税税源采集表税目
  • 如何查询以前申请的新西兰签证记录
  • 增值税普票如何开具红字发票
  • 资产负债表可以反映的具体信息有
  • 所得税税率变化对已确认递延所得税资产的影响
  • 项目提前竣工借款合法吗
  • 固定资产盘亏所得税清算时怎么处理
  • 收到国税退款的分录
  • 研发支出全部资本化能不能评高企
  • 工会经费如何申请返还
  • 可以从公司公户直接支付给个人的款项有哪些
  • 其他综合收益属于什么科目借贷方向
  • 数电怎么增加开票员
  • mysql安装教程5.5安装好了在哪使用
  • 清理的快捷键是什么
  • Win7 64位旗舰版中让SSD固态硬盘更快的优化方法
  • windows关机蓝屏是怎么回事
  • win8的ie浏览器
  • ubuntu sshserver
  • win8老是自动安装软件
  • ntfs权限设置步骤
  • centos文本编辑器
  • 写出linux安装的详细步骤
  • sentstrt.exe - sentstrt进程是什么文件 有什么用
  • java.exe是指
  • linux find命令用法
  • angular jsx
  • nodemcu连接阿里云
  • python3.7怎么安装pil
  • python怎么用
  • python读取一个文件并写入另一个文件
  • python utils模块
  • jquery mobile grid
  • Android自定义控件
  • 国家企业税务总局
  • 增值税进项转出补企业所得税
  • 上海浦东税务局电话 工作时间
  • 提高增值税税率是什么意思
  • 出口退税申报时间规定
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设