How to add secondary textures settings to Sprite Atlas through C#?

Hello!
I have an automated system (Unity 2020.2.0f1) where I pick a bunch of separated sprites with a secondary Normal Map, and I add them to a generated SpriteAtlas asset. Works good, but the normal map needs to have the sRGB option uncheked.
In the editor, this is done through the Secondary Settings panel:

However, since this is an editor script, I need to add this secondary settings through C#, but I don’t find any method nor documentation to do this.
What I do right now is:

atlas.Add(spriteFiles.ToArray());

//This texture settings are only for the primary texture. Is there a way of doing the same to the secondary Normal Map?
        SpriteAtlasTextureSettings newTextSettings = new SpriteAtlasTextureSettings();
        newTextSettings.filterMode = FilterMode.Point;
        newTextSettings.sRGB = true;     
        atlas.SetTextureSettings(newTextSettings);

        TextureImporterPlatformSettings newPlatformSettings = new TextureImporterPlatformSettings();
        newPlatformSettings.textureCompression = TextureImporterCompression.Uncompressed;
        atlas.SetPlatformSettings(newPlatformSettings);

         AssetDatabase.CreateAsset(atlas, atlasPath);
        AssetDatabase.SaveAssets();

Is not the biggest of the deals (the script already lifts a lot of work for me), but I would like to spare me some repetitive clicks.

in this code you don’t seem to be accessing SpriteAtlas object, but SpriteAtlasAsset.
SpriteAtlas does not have SetTextureSettings and SetPlatformSettings.

it makes sense to show your entire code, not just a misleading part of it.

“atlas” is a SpriteAtlas. SetTextureSettings and SetPlatformSettings come from Sprite Atlas Extensions.

7480295--919868--upload_2021-9-8_11-58-38.png

Ah ok right, it’s an editor-only thing. I apologize then, this thing really has documentation all over the place.

Did you find a solution to this? Seems the only way to do it is SpriteAtlasExtensions.SetSecondaryColorSpace() which is internal.