位置: 编程技术 - 正文

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
  • 如果没有预缴就开票会怎样?
  • 股东折价入股会计分录
  • 给员工发放奖励计入
  • 13个点的税怎么算税金
  • 房产税怎么做账
  • 一般纳税人专用发票怎么做账
  • prevsrv.exe - prevsrv是什么进程 有什么用
  • 营业外支出的税额要进项转出吗
  • php导出数据到excel
  • qcwlicon.exe - qcwlicon是什么进程 有何作用
  • php parse_url
  • 什么叫做材料成型工艺
  • 结构性存款利息增值税
  • 私营公司股权转让
  • typora修改背景颜色
  • fs209e是什么意思
  • 旅游企业会计ppt
  • 员工辞退补偿金扣个税吗
  • 外贸企业申报出口退税的期限
  • 销售退回的会计分录金额
  • 酒店装修费用计入什么科目
  • 出租的厂房房产税如何征收
  • 存货盘盈如何记账
  • 库存现金日记账的登记依据
  • 红字发票什么作用
  • 职工福利费会计科目怎么写
  • thinkphp with
  • 民营医院所得税税率
  • Yii2中使用asset压缩js,css文件的方法
  • gawk命令 模式扫描与处理语言
  • 发票作废发票怎么处理
  • 个人注册投资有限公司
  • 企税申报表怎么填
  • 会计凭证的装订范围包括
  • sqlserver代理服务启动失败
  • 什么是销项税额转出
  • sqlserver完整备份
  • 坏账准备是资产减值损失吗
  • 归纳投入外币资产怎么写
  • 退还多余的预收款项的会计分录
  • 电子发票报销后退款
  • 商标使用权入股要交税吗
  • 油票发票在报销单上怎么填写
  • 固定资产处置有净值怎么处理
  • 营业收入和销售收入的比值
  • Linux/UNIX和Window平台上安装Mysql
  • win8打开运行的快捷键是什么
  • win10假死的原因
  • win7的开始菜单在哪里
  • hp是什么软件缩写
  • win8.1内存占用过高
  • vim中执行shell命令
  • win7电脑操作日志怎么查看
  • w8系统鼠标在哪里调
  • 无线和网络飞行模式
  • 惠普笔记本的BIOS键
  • win10系统优化的方法
  • win7网页有错误如何修复?
  • 我的第二个姐姐用英语怎么说
  • perl编程
  • php滚动代码
  • 三消游戏攻略
  • 用js设置颜色
  • js获取当前浏览器版本
  • jquery弹出提示框
  • jq中attr用法
  • 青岛市税务局内设机构
  • 怎么查票据真伪
  • 小微企业印花税减免政策2024
  • 江西公安电子证件
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设