#well yeah its due to the amount, but
1 messages · Page 1 of 1 (latest)
this is what im seeing in the profiler
what i understand is that it is due to script, which is weird because the script each of them have is very small
thats when i was looking at the tiles btw
ok, so does performance improve when you look away and none are on screen
and what is the script?
there is about 10 fps difference of when i look at them vs when i look away
this is all the code inside them
private void OnTriggerEnter(Collider other)
{
if (other.transform.CompareTag("Player"))
{
//transform.AddComponent<Rigidbody>();
Rigidbody rb = transform.GetComponent<Rigidbody>();
rb.isKinematic = false;
rb.useGravity = true;
Destroy(gameObject, 5);
}
}
nothing in Update?
no update event in them
so pause the profiler and select one of the spikes
you should be able to sort the bottom view bot total %
how do you read this?
dig into the player loop part
also i would test performance in a build at some point as well. the editor is a large amount of overhead and can cause some objects to always render
you werent kidding 🤣
ran it in a build now, and i get 300 fps
yeah editor a lot of objects are always loaded
but also objects in the scene view would also be rendering not just what you see in the game view