Support TexturePacker image atlases
This commit is contained in:
@@ -222,8 +222,15 @@ class GameResource {
|
||||
'spine resource.skeleton must be a non-empty string',
|
||||
);
|
||||
}
|
||||
} else if (path is! String || path.isEmpty) {
|
||||
throw const FormatException('resource.path must be a non-empty string');
|
||||
} else {
|
||||
if (path is! String || path.isEmpty) {
|
||||
throw const FormatException('resource.path must be a non-empty string');
|
||||
}
|
||||
if (atlas != null && (atlas is! String || atlas.isEmpty)) {
|
||||
throw const FormatException(
|
||||
'image resource.atlas must be a non-empty string',
|
||||
);
|
||||
}
|
||||
}
|
||||
final preload = map['preload'] as String? ?? GameResourcePreload.required;
|
||||
if (!GameResourcePreload.isSupported(preload)) {
|
||||
|
||||
Reference in New Issue
Block a user