newRegionAttachment method
Implementation
@override
RegionAttachment newRegionAttachment(Skin skin, String name, String path) {
final TextureAtlasRegion? region = atlas.findRegion(path);
if (region == null) {
throw StateError(
'Region not found in atlas: $path (region attachment: $name)');
}
region.renderObject = region;
final RegionAttachment attachment = RegionAttachment(name)
..setRegion(region);
return attachment;
}