Since sometimes we have to rename a sprite texture2D, it could be nice to also update sprites names which have already been generated from this texture.
At least it was my attempt with the script below, however I was not able to make it working so far.
Please, does anyone have some clue on how we could manage that by code?
It will be super helpful!
I think your attempt above is noble and wonderful but I think the reason it fails is that Unity only allows you to manipulate this type of data by writing a custom asset importer, in this case a custom importer for textures.
How such a thing might interoperate with the existing sprite editor, etc., I have no idea.
ANOTHER option is to go into the .meta file and manipulate the names directly there. I would do that with Unity closed so that it imports correctly upon reopen. Make sure it doesn’t break any linkages.