defect Mac OS X build

hello together!

when i build my game for Mac OS X no unity startscreen appears and my time based score is not working. when i build it for android or for the web all is fine. i have build it already for Mac OS X two days ago and then also all was fine.

someone know what to do? can i reset something?

nobody an idea?

When you say the Unity start screen, do you mean the configuration dialog? Can you give any more detail about what the time based score should be doing and what is going wrong with it?

no i mean this “powered by unity” splash screen. now i have reinstalled unity but with no luck.

my game is a 2d platformer where you be a ball that have to jump over cubes on the random loaded platforms where are moving from right to left across the screen.

this is my scoring script. the score start counting if the scene is loaded. if the ball falling from the platform or is colliding with an cube the StopScore() function is called from another script:

static var score : int = 0;

var mystyle : GUIStyle;
var fontColor : Color;
var outColor : Color;
var guiposition : Rect;

static var savedhighscore;
savedhighscore = PlayerPrefs.GetInt("highscore");

static var scoring : boolean = true;

function Awake () {
	score = 0;
	scoring = true;
}

function Update(){
	if (scoring == true){
	score += Mathf.Round(Time.deltaTime*100);
	}
}

function OnGUI(){
    guiposition = Rect((Screen.width/2)-400, 25, 800, 50);
//    mystyle.normal.textColor = outColor;
//	guiposition.x--;
//	GUI.Label (guiposition, ""+ score, mystyle);
//	guiposition.x +=2;
//	GUI.Label (guiposition, ""+ score, mystyle);
//	guiposition.x--;
//	guiposition.y--;
//	GUI.Label (guiposition, ""+ score, mystyle);
//	guiposition.y +=2;
//	GUI.Label (guiposition, ""+ score, mystyle);
//	guiposition.y--;
	mystyle.normal.textColor = fontColor;
	GUI.Label (guiposition, ""+ score, mystyle);
}

function StopScore(){
	scoring = false;
	if (score > savedhighscore ){ 
	PlayerPrefs.SetInt("highscore", score);
	}
	Application.LoadLevel (2);
}

in the Mac OS X build the score is counting very very slow.

with the tilt of the device the user can rotate the platforms in the android build. i use Input.GetAxis(“Horizontal”) for this in the Mac build to rotate the platforms and the cubes. this are this two scripts:

this for the platforms:

function Update () {
	//transform.Translate(-5 * Time.deltaTime, 0, 0);
	transform.position.x  -= 5 * Time.deltaTime;
	
	////with tilt control
	
	//transform.Rotate(0, 0, -Input.acceleration.y);
	transform.Rotate(0, 0, Input.GetAxis("Horizontal")/10);
}

and this for the cubes:

function Update () {
//rigidbody.velocity.y = -15;

////with tilt control

transform.position.x  -= 5 * Time.deltaTime;
//transform.Rotate(0, 0, -Input.acceleration.y);
transform.Rotate(0, 0, Input.GetAxis("Horizontal")/10);
}

function  OnCollisionEnter  (collisionInfo : Collision) {
	//transform.parent = collisionInfo.gameObject.transform;
	////destroy if hit another badcube
	if (collisionInfo.gameObject.tag == "Badcube"){
		Destroy (gameObject);
	}
}

in the game view all looks fine. but in the Mac build this reacts much more sensitive.

Use FixedUpdate
read UpdateOrder part here for difference
http://docwiki.unity3d.com/index.php?n=Main.ExecutionOrder

THANK YOU VERY VERY MUCH!

now it works. and thank you for the link. but one more question. i dont understand this: “When applying movement calculations inside FixedUpdate(), you do not need to multiply your values by Time.deltaTime.” is this FixedUpdate function called like the time? for which things do you using this function. can you give me another little example?

http://docwiki.unity3d.com/index.php?n=Main.class-TimeManager

thank you! i have no idea that this TimeManager exists! :slight_smile: