#Show the !code of both scripts
1 messages · Page 1 of 1 (latest)
Nothing here is particularly slow. Where are you seeing that these are the cause of the slowdown
the objects are the cause of the slowdown because when i turn off the parent and exclude them from the scene it runs fine
Is there anything on the parent
no, just the transform
How complicated are the polygon colliders
i'd show you but in the process of getting help from discord unity went:
lol what is happening here
private void OnCollisionEnter2D(Collision2D collisionData)
{
OnTriggerEnter2D(collisionData.collider);
}```
Looks like you have a render texture with no height or width
sprites are about like this, i noticed delauney meshes were better than the default so i was usin those
yeah and it's supposed to be for the scene view?
If there's nothing in the stack trace that has a line number you can probably ignore it
i can't because my scene view is greyed out and i cant see anything
wait no it's just black and white
Do you have anything typed in the search box
no
also no
well fixed the scene color by restoring the layout, but the objects still have significant demand
so theres like 7 objects with kindof complicated delauney mesh colliders, and scripts to follow my player and that's enough to halt my game
the sprites themselves don't even seem overly detailed
You should probably just use a box collider
alr
wow that is a massive difference
thanks
do you know why the meshes are so much more expensive?
Because a box has four vertices
This has like, a hundred
true
kind of sucks that the colliders calculate the entire collider instead of using having a simple stopgap collider that determines if they are able to collide before using the complicated one
like use a radius or box or pill or something by default and then go throug the nitty gritty when objects are really close
anyways thanks
private void OnCollisionEnter2D(Collision2D collisionData)
{
OnTriggerEnter2D(collisionData.collider);
}
private void OnTriggerEnter2D(Collider2D colliderData)
{
the oncollision method isn't working, what do i need the collider set up as to trigger the collision enter or trigger enter methods?