mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-19 00:06:42 +08:00
- Added support for SpriteCollection using multi-platform.
This commit is contained in:
parent
a4bd912dc1
commit
99c81b6b01
@ -23,8 +23,8 @@ public class tk2dSpineAttachmentLoader : AttachmentLoader {
|
||||
if(type != AttachmentType.region) throw new Exception("Unknown attachment type: " + type);
|
||||
|
||||
tk2dSpriteDefinition attachmentParameters = null;
|
||||
for(int i = 0; i < sprites.spriteDefinitions.Length; ++i) {
|
||||
tk2dSpriteDefinition def = sprites.spriteDefinitions[i];
|
||||
for(int i = 0; i < sprites.inst.spriteDefinitions.Length; ++i) {
|
||||
tk2dSpriteDefinition def = sprites.inst.spriteDefinitions[i];
|
||||
if(def.name == name) {
|
||||
attachmentParameters = def;
|
||||
break;
|
||||
|
||||
@ -137,7 +137,7 @@ public class tk2dSpineSkeleton : MonoBehaviour {
|
||||
mesh.triangles = triangles;
|
||||
mesh.RecalculateNormals();
|
||||
|
||||
renderer.sharedMaterial = skeletonDataAsset.sprites.spriteCollection.materials[0];
|
||||
renderer.sharedMaterial = skeletonDataAsset.sprites.spriteCollection.inst.materials[0];
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user