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