I cannot test this in 4.11 because my 4.11 Preview 4 will not launch(already filed bug and it’s been confirmed).
The problem is that whenever I import a different sprite with the same name over another sprite the collision won’t rebuild.
An example would be: If my previous sprite was a triangle named “sprite_triangle” and I imported a square over it with the same “sprite_triangle” name the collision would still be that of the triangle, and not the square.
As a temporary solution the you can edit most of the collision settings within the sprite and it will recalculate the proper collision. EG: changing collision detail from 0.5 to 1 will cause collision to recalculate properly, it can then be turned back.
This is just a bit of a headache since I’m experimenting with over 200 sprites and the collision must be precise per sprite.
This is expected since you are modifying/changing the source texture, of the sprite. The editor does not automatically account for sprite collisions until you run the ‘Extract Sprites’ option on the newly imported source texture.
I just tested this issue in 4.10.2 and saw what you are saying, but importing a new source texture with a different shape in order to replace an existing one with the same name, will need to have it’s collision modified anyway. The best way to do this is to click on the ‘Extract Sprites’ option on the texture sample, and your collision will be updated correctly.
I also noticed that there are a few dialog messages that pop up to warn the user that you are overwriting a source texture, which is sort of a warning that pre-existing sprites using that source texture will have their collisions incorrect relative to the sprites shape.
If you have further questions, please let me know.
There is actually a dialog window that pops up which will allow you to keep the settings of the Sprite when you change the source texture.
Selecting ‘No’ will keep your settings, but you will need to modify the collision. As I mentioned, this is expected because the shape has now changed, but you can also change the collision wrapping method. In the example below, I imported and created a square sprite, but then changed the source texture to a pentagon shape.
You aren’t going to get the best of both worlds when re-importing a new sprite source texture if the shape changes a lot. Either re-extract sprites and copy over sprite settings, or modify the collision.
Ah, I was afraid of that. So unless you’re using default settings when you re-import you have the option to rebuild collision using default settings, or rebuild manually while keeping your settings.