I run the game, and it's choppy. Will it be the same if I build it?

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.

The build version of your game will be slightly faster then the editor version, in the editor some editor-stuff is still happening in the background.

find with tag is a particularly slow function. And ys, building it will be the same unless you use a lower resolution

instead of using findwithtag you would be better off using a private var gameobject. and checking for only that object. if it isn’t there create a new one (using the same variable)

You could always just build it and see for yourself

Having a 17K poly mesh collider is ridiculously expensive, even more so if you’re animating it! Either use hand-tweaked CapsuleColliders on the bones or at the very very least a sepearate severely cut down mesh (usually pretty trivial to do in you modelling app).

Also, your code seems to be doing the same Raycast multiple times. Do it once then examine the result.