newMeshAttachment method

  1. @override
MeshAttachment newMeshAttachment(
  1. Skin skin,
  2. String name,
  3. String path
)
override

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;
}