Resources folder, images and atlas

I want to be able to load images on demand using Resources.Load function. But also to be efficient in regarding to draw calls, so I want to create an atlas for those images.

I was wondering what will happen if I’ll place images under Resources folder and add a Sprite Atlas for them as well. Will the build package contain both the images and their atlas???

Is this the correct way to do that?

I tried loading SpriteAtlas, it seems to work as expected

var atlas = Resources.Load<SpriteAtlas>(atlasName);
var sprite = atlas.GetSprite(spriteName);

relevant thread Sprite Atlas and Sprites in Resources folder

I guess you have to place the sprites outside the Resources folder, and place only the atlas inside the Resources folder to avoid having the build contain both the atlas and the sprites