Thank you, Mario!
According to the source code you pointed to, I found out a way to do this. I add following modification to my code to force to recreate the material.
skeleton->Atlas->GetAtlas()->getPages().add(page);
skeleton->Atlas->atlasPages.Add(texture);
Now the output is right now as the following screenshot.
In case someone need the same function in the future, I paste the code here. (Maybe need more test for it)
RegionAttachment* atta = (RegionAttachment*)attachment;
auto oldRegion = (AtlasRegion*)atta->getRendererObject();
auto oldPage = oldRegion->page;
AtlasPage *page = NULL;
char *name = TCHAR_TO_ANSI(*texture->GetName());
page = new (__FILE__, __LINE__) AtlasPage(TCHAR_TO_UTF8(*slotName));
page->setRendererObject(texture);
page->name = oldPage->name;
page->texturePath = oldPage->texturePath;
page->width = texture->GetSizeX();
page->height = texture->GetSizeY();
page->uWrap = TextureWrap_ClampToEdge;
page->vWrap = TextureWrap_ClampToEdge;
UE_LOG(LogTemp, Log, TEXT("width is:%d, height is:%d"), page->width, page->height);
UE_LOG(LogTemp, Log, TEXT("old page:width is:%d, height is:%d"), oldPage->width, oldPage->height);
AtlasRegion *region = new (__FILE__, __LINE__) AtlasRegion();
region->width = texture->GetSizeX();
region->height = texture->GetSizeY();
region->originalWidth = texture->GetSizeX();
region->originalHeight = texture->GetSizeY();
region->page = page;
region->u = 0;
region->v = 0;
region->u2 = 1;
region->v2 = 1;
region->degrees = 0;
region->offsetX = 0;
region->offsetY = 0;
skeleton->Atlas->GetAtlas()->getPages().add(page);
skeleton->Atlas->atlasPages.Add(texture);
atta->setRendererObject(region);
atta->setUVs(0, 0, 1, 1, 0);
atta->updateOffset();