diff --git a/UndertaleModTool/Editors/UndertaleRoomEditor.xaml.cs b/UndertaleModTool/Editors/UndertaleRoomEditor.xaml.cs index d90ca8334..dfc545e4f 100644 --- a/UndertaleModTool/Editors/UndertaleRoomEditor.xaml.cs +++ b/UndertaleModTool/Editors/UndertaleRoomEditor.xaml.cs @@ -1468,7 +1468,9 @@ public static void GenerateSpriteCache(UndertaleRoom room) break; case LayerType.Instances: - allObjects.AddRange(layer.InstancesData.Instances); + var instances = layer.InstancesData.Instances + .Where(g => g.ObjectDefinition?.Sprite?.Textures.Count > 0); + allObjects.AddRange(instances); break; } }