I included only one atlas in the build, the one necessary for the main menu and the first level. The other atlases (atlas for level 2, level 3 and so on) are NOT included in the build and i use resources.load to load them when they are needed so i can cut down my initial loading time. I have 500mb of textures which i can split into multiple parts so i need to load only 100mb on game start instead of 500mb and load the rest as needed in cutscenes between levels.
The thing is, loading the sprite atlas resource is not enough. You may load the sprite atlas as a resource on runtime, but it will do nothing, sprites will have white squares instead of texture.
So, this is what the sprite atlas API tells:
If ‘Include in Build’ is disabled, Unity still packs the Sprite Atlas into a *.spriteatlas file in the Project’s Assets folder. However, Sprites which reference Textures in an disabled Sprite Atlas appear invisible as the reference Texture is not available or loaded. Unity does not include the disabled Sprite Atlas in the Project’s published build, and does not automatically load it at run time. To do so, a script is required to load the Sprite Atlas via Late Binding.
Late Binding is the name of a process in which you load or swap in the desired Sprite Atlas at run time via the Sprite Atlas API. This is necessary when the build does not automatically load a prepared Sprite Atlas at run time (for example, when no Sprite Atlases are included in the build.)
So, actually, the sprite atlas loaded using resources.load is just a reference list that needs to be populated using Late Binding:
To retrieve the contents of a Sprite Atlas at run time, follow these steps:
Create a custom component that takes SpriteAtlasas a public variable.
Assign a Sprite Atlas to the field.
Enter the Editor’s Play Mode.
Access the variable and call the property .GetSprites to retrieve the array of Sprites packed in the selected Atlas.
I don't know the inner workings of Sprite Atlas, but i guess the included in the build Atlas makes a fixed array that connects references from Sprite Atlas to actual sprites, thus that's why an array has to be made and populated.
Anyway, as i said, resource.load does jackshit without binding, you can try it out yourself. It's quite dumb, i expected that once loaded from resources, it will take care of itself.