0
我寫這段代碼,我不知道如何修復此代碼的所有錯誤,但此代碼在pc模式下正常工作,但在Android模式下給出錯誤這是我的代碼:統一浮動和Android平臺中的對象錯誤
var background : Texture2D;
var splash : Texture2D;
var font : Font;
private var showADPresents = 3.0;
var size = null;
static var virtualScreen : Vector2 = Vector2(800, 600);
function Update()
{
showADPresents -= Time.deltaTime;
if (Application.CanStreamedLevelBeLoaded(1) && Input.anyKeyDown)
Application.LoadLevel(1);
}
function OnGUI()
{
GUI.matrix = Matrix4x4.TRS(Vector3.zero, Quaternion.identity, Vector3(Screen.width/virtualScreen.x, Screen.height/virtualScreen.y, 1));
GUI.DrawTexture(Rect(0, 0, virtualScreen.x, virtualScreen.y), splash);
if (showADPresents > 0)
{
var alpha = Mathf.Clamp01(showADPresents);
var color = Color.white;
color.a = alpha;
GUI.color = color;
GUI.DrawTexture(Rect(0, 0, virtualScreen.x, virtualScreen.y), background);
var presentsStyle = new GUIStyle(GUI.skin.label);
presentsStyle.font = font;
presentsStyle.fontSize = 48;
size = 300;
color = Color.black;
color.a = alpha;
GUI.color = color;
GUI.Label(Rect((virtualScreen.x - size) * 0.5, (virtualScreen.y - size) * 0.5, size, size), "Autodesk Presents:", presentsStyle);
}
else
{
var notificationStyle = new GUIStyle(GUI.skin.label);
notificationStyle.font = font;
notificationStyle.fontSize = 16;
GUI.color = Color.black;
var content = null;
if (Application.CanStreamedLevelBeLoaded(1))
content = new GUIContent("Click Screen to Continue");
else
content = new GUIContent("Loading...");
size = notificationStyle.CalcSize(content);
GUI.Label(Rect((virtualScreen.x - size.x) * 0.5, virtualScreen.y - size.y - 80, size.x, size.y),
content, notificationStyle);
}
}
統一給我這個錯誤,我不能解決這個錯誤plz幫助我的幫助:「(
http://upload.ghashang.com/images/gm214joveg1z354rkli.jpg
PLZ信仰我並不能解決這個錯誤plz幫助我 PLZ解決所有錯誤
謝謝你幫助我,當我改變我的代碼統一給我其他錯誤PLZ改變這種代碼爲我plz改變這段代碼的所有行我哪個團結不要給我錯誤plz plz plz幫助我,並改變我的代碼謝謝你的朋友謝謝 – user3288039
@ user3288039嘗試搜索此網站的答案...有很多問題和大多數已經被回答 –
plz更改我的代碼我無法改變只爲我的朋友:'(:* – user3288039