- Home /
Saving scene causes "Importing small assets" dialog briefly, and freezes Unity for ~10 seconds
I'm trying to figure out what could cause this.
I have an editor window for creating 2D environments: placing objects, drawing tiles from a tileset, etc.
This window handles all the drawing and such itself, and then you "bake" the world to the scene, where it creates Texture2D instances, Sprite instances, GameObjects with SpriteRenderers, and GameObjects with 2D box colliders.
My problem is that, whenever I use this process to bake the environment to my scene, it causes any saving of the scene to be slow.
Whenever I save, the dialog box pops up with the title "Hold on" and a progress bar, which remains at 0%, and text beneath it saying "Importing small assets..."
This box shows for a second or two, then it disappears. After this, Unity is frozen and none of my input goes through for about 10 seconds. After those 10 seconds, everything is fine again, and the scene is saved.
I've tried it on different scenes. As long as the baked objects are in the scene, the problem persists. If I delete them, the problem returns.
I don't know if this is the right place to ask for help on this matter, but I'd love to figure out what's causing this issue.
I'm not creating an inordinate amount of objects (the environments I'm testing with are quite small) so I can't imagine that it's simply too many objects.
I am creating Texture2D instances and Sprite instances from scratch, making GameObjects from scratch (with the new GameObject("name")
constructor), and adding BoxCollider2D
components to them.
Could any of this be a hint on where Unity is finding the need to "import small assets" from?
Your answer

Follow this Question
Related Questions
Retaining Data Between Levels 2 Answers
Saving and Loading 0 Answers
Saving usermade creations in game 1 Answer
Android and PlayerPrefs.Save 2 Answers
how do you make a save script fo minecraft like games 1 Answer