c# – Making Texture Atlast in Unity

For optimization purposes and reducing batches count, I am trying to combine my floor tiles textures into different atlases. Sharing the same material with an atlas can decrease draw calls and hence increase the performance.
Here is my code snippet that creating atlas but i am unable to understand how to get texture back from the atlas:

public class TexturePack : MonoBehaviour
{
    public GameObject() allFloor;

    public GameObject() newFloor;
    // Source textures.
    Texture2D() atlasTextures;

    // Rectangles for individual atlas textures.
    Rect() rects;
    public Texture2D atlas;
    void Start()
    {
        atlasTextures = new Texture2D(allFloor.Length);

        for (int i = 0; i < atlasTextures.Length; i++)
        {
            atlasTextures(i) = (Texture2D) allFloor(i).gameObject.GetComponent<MeshRenderer>().material.mainTexture;
        }
        // Pack the individual textures into the smallest possible space,
        // while leaving a two pixel gap between their edges.
        atlas = new Texture2D(512, 512);
        rects = atlas.PackTextures(atlasTextures, 2, 1024);

        //how to get texture from the atlas for specifc object
    }
}

Within unity will it work or i have to go to modelling software for uv mapping?