I'm making a standalone simple game, it's really choppy when i run it in unity. I wonder if it will be when i build it into an exe file. i was worrying it would be the same.. any tips to fix the choppyness?
ok here it goes:
i am making a simple shooting game where targets appear every after a target has been shot. the prafab has animation attached to it, just to make the target move forward towards the shooter. The 3d model is 1.7MB,which has 17 polys, and generate collider is turned on because i'm using raycast to detect the collision between the target and the bullet. i also attached a light to the target prefab along with the model.
I only have a single scene, and have a simple plane,house model, and directional light in my hierarchy.
sample of my scrip looks like this:
function t1_1() {
if(Physics.Raycast(transform.position,transform.forward,hit1,5))
{
if(hit1.collider.gameObject.tag=="t1_1")
{
Unlock.line=2;
Destroy(gameObject.FindWithTag("t1_1"));
Destroy(gameObject.FindWithTag("bullet"));
print(Unlock.line);
}
}
}
function t1_2() {
if(Physics.Raycast(transform.position,transform.forward,hit1,5))
{
if(hit1.collider.gameObject.tag=="t1_2")
{
Destroy(gameObject.FindWithTag("t1_2"));
Destroy(gameObject.FindWithTag("bullet"));
Unlock.line=3;
print(Unlock.line);
Instantiate(preft1_4,Vector3(0,0,0),Quaternion.Euler(0,0,0));
Instantiate(preft1_5,Vector3(561.695,18.81595,135.9075),Quaternion.Euler(0,0,0));
}
}
}
function t1_3() {
if(Physics.Raycast(transform.position,transform.forward,hit1,5))
{
if(hit1.collider.gameObject.tag=="t1_3")
{
Unlock.line=4;
Destroy(gameObject.FindWithTag("t1_3"));
Destroy(gameObject.FindWithTag("bullet"));
print(Unlock.line);
Instantiate(preft1_6,Vector3(508.2942,18.81595,138.7743),Quaternion.Euler(0,0,0));
}
}
}
hope these infos are sufficient.