Sprite generated and sliced programatically does not show its sliced children sprites on the project folder

I have an editor script that slices sprites automatically as they are imported into the project.

public void OnPostprocessTexture(Texture2D texture)
{
string spriteName = myScript.GetName() + “-”;
int spriteSize = texture.width/8;
int count = 8;

List<SpriteMetaData> metas = new List<SpriteMetaData>();
List<SpriteMetaData> finalMetas = new List<SpriteMetaData>();
int i = -8;
for (int y = count; y > 0; --y)
{
    for (int x = 0; x < count; ++x)
    {
        SpriteMetaData meta = new SpriteMetaData();
        meta.rect = new Rect(x * spriteSize, (y * spriteSize) - spriteSize, spriteSize, spriteSize);
        meta.name = "a";
        i++;

        metas.Add(meta);
    }
}

TextureImporter textureImporter = (TextureImporter)assetImporter;
textureImporter.spritesheet = finalMetas.ToArray();

}

This works perfectly, as can be seen here.

The problem is, even though the sprite is sliced, it does not show its children sliced sprites in the project folder. There is no arrow to click and expand the list of sliced sprites, even though it is clearly set to multiple and it is clearly sliced as can be seen on the preview, on the image above.

Strangely enough, when I duplicate (shift + D) the sprite, the duplicate will “update”, realizing it has multiple children, but the original will not.
184682-spriteslice-03.png

I have already tried Assetdatabase.Refresh. I tried textureImporter.SaveAndReimport() to no avail. What is even stranger is that if I generate a sprite, close unity and open it again, the sprite will still not show its children. There is probably a very specific method somewhere I need to call to force update this sprite, but I don’t know which.

Thanks in advance to whoever knows the answer to this niche problem.

I found a workaround, thought it is not ideal.
I noticed that if I manually renamed the file with F2, when I renamed it, the children sliced sprites would appear. So what I do is I rename the texture programmatically after I generate it using

AssetDatabase.RenameAsset(myPathString, "My_new_texture"); 

Just a thing though, if you rename it to the same name it already had, nothing happens so you need to rename it to something else.