unity3D技术之PlayerSettings.defaultIsFullScreen 默认是否全屏

花开成海 分享 2020-03-16 下载文档

static var defaultIsFullScreen : bool

Description描述

If enabled, the game will default to fullscreen mode. 如果启用,游戏将默认全屏模式。

The Windowed checkbox on the Resolution Dialog will be disabled by default when this setting is enabled.

当这个设置启用,分辨【狗刨学习网】率对话框中的复选框默认将被禁用。

Custom player settings. 自定义播放器设置。

// Simple Script that saves and loads custom // Stand-alone/Web player screen settings among // Unity Projects

//保存和加载Unity项目的自定义独立版/Web播放器设置 class CustomSettings extends EditorWindow {

@MenuItem(\static function Init() {

var window = GetWindow(CustomSettings);

var compName : String = \var prodName : String = \var screenWidth : int = 640; var screenHeight : int = 480; var webScreenWidth : int = 640; var webScreenHeight : int = 480; var fullScreen : boolean = false;

}

window.Show();

function OnGUI() {

compName = EditorGUILayout.TextField(\

compName);

prodName = EditorGUILayout.TextField(\

prodName);

EditorGUILayout.BeginHorizontal();

screenWidth = EditorGUILayout.IntField(\

screenWidth);

screenHeight = EditorGUILayout.IntField(\

screenHeight);

EditorGUILayout.EndHorizontal(); EditorGUILayout.Space();

EditorGUILayout.BeginHorizontal();

webScreenWidth = EditorGUILayout.IntField(\Width:\

webScreenWidth);

webScreenHeight = EditorGUILayout.IntField(\

Height:\

EditorGUILayout.EndHorizontal();

fullScreen = EditorGUILayout.Toggle(\

Screen:\

function SaveSettings() { }

EditorGUILayout.BeginHorizontal(); if(GUILayout.Button(\

SaveSettings();

if(GUILayout.Button(\

LoadSettings();

EditorGUILayout.EndHorizontal();

PlayerSettings.companyName = compName; PlayerSettings.productName = prodName;

PlayerSettings.defaultScreenWidth = screenWidth; PlayerSettings.defaultScreenHeight = screenHeight; PlayerSettings.defaultWebScreenWidth = webScreenWidth; PlayerSettings.defaultWebScreenHeight =

webScreenHeight;

EditorPrefs.SetString(\EditorPrefs.SetString(\EditorPrefs.SetInt(\EditorPrefs.SetInt(\EditorPrefs.SetInt(\EditorPrefs.SetInt(\

PlayerSettings.defaultIsFullScreen = fullScreen;

webScreenHeight);

}

function LoadSettings() {

compName = EditorPrefs.GetString(\prodName = EditorPrefs.GetString(\screenWidth = EditorPrefs.GetInt(\screenHeight = EditorPrefs.GetInt(\webScreenWidth =

EditorPrefs.GetInt(\

webScreenHeight =

EditorPrefs.GetInt(\ }

}


unity3D技术之PlayerSettings.defaultIsFullScreen 默认是否全屏 .doc 将本文的Word文档下载到电脑

下一篇:零件订单供应管理系统数据库

相关推荐
相关阅读
本类排行
× 游客快捷下载通道(下载后可以自由复制和排版)

下载本文档需要支付 7

支付方式:

开通VIP包月会员 特价:29元/月

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:xxxxxx QQ:xxxxxx