- Home /
Sprites losing reference after reimporting their files
Hey all,
I've recently noticed a change in Unity 2021.2 regarding the reimporting of visual files. Before this update I was able to delete and re-add visual files such as PNGs to my assets folder without causing too much of a problem. After slicing the sprites into their individual pieces using the sprite editor, any gameobjects that referenced the pieces would reference the new sprite under the same name automatically. However, as of Unity 2021.2, upon deleting a visual file and reimporting it, gameobjects in the scene will NOT keep their reference to the file and will instead be referencing a "missing sprite". Using the "smart" and "safe" sprite slicing methods in the sprite editor doesn't seem to change this.
I've been using this reimporting method for a long time now, and it was honestly really convenient as I can be quite particular about the way my game looks.
I suppose my question is: is this intentional or is it a bug that will be fixed in the near future? And is there any other way to safely reimport files while keeping their in-game references (other than downgrading my version of Unity to 2021.1)? Thanks for the help in advance.
Your answer
![](https://koobas.hobune.stream/wayback/20220613045712im_/https://answers.unity.com/themes/thub/images/avi.jpg)