Ah ok! Thanks for the update. Yes I had noticed it was from a couple years back, but since I was having trouble finding more recent info on this pipeline, I figured it might work (the video makes it look so simple! haha). But cool, I'll take a look at this MixAndMatch script you refer to and give it a go.
22 Jun 2017, 12:08
Ok I've been testing out the Mix and Match scene (super awesome, makes a lot of sense), and then have started bringing it over into our game flow. But I'm encountering a chain of problems, and they seem to stem from the fact that we're using SpineAnimator
instead of SpineAnimation
(so we can use the mechanim graph). Since SpineAnimator
doesn't have an AnimationState, I can't pass anything in for the third param here:
var newSkin = skeleton.UnshareSkin(true, false, skeletonAnimation.AnimationState);
But if I leave that param null, I end up getting the following error:
ArgumentNullException: Argument cannot be null.
Parameter name: region
Spine.Unity.Modules.AttachmentTools.AttachmentCloneExtensions.GetLinkedMesh (Spine.MeshAttachment o, System.String newLinkedMeshName, Spine.AtlasRegion region, Boolean inheritDeform) (at Assets/spine-unity/Modules/AttachmentTools/AttachmentTools.cs:864)
Spine.Unity.Modules.AttachmentTools.AttachmentCloneExtensions.GetLinkedClone (Spine.MeshAttachment o, Boolean inheritDeform) (at Assets/spine-unity/Modules/AttachmentTools/AttachmentTools.cs:788)
Spine.Unity.Modules.AttachmentTools.AttachmentCloneExtensions.GetClone (Spine.Attachment o, Boolean cloneMeshesAsLinked) (at Assets/spine-unity/Modules/AttachmentTools/AttachmentTools.cs:740)
Spine.Unity.Modules.AttachmentTools.SpriteAtlasRegionExtensions.GetRepackedSkin (Spine.Skin o, System.String newName, UnityEngine.Shader shader, UnityEngine.Material& m, UnityEngine.Texture2D& t, Int32 maxAtlasSize, Int32 padding, TextureFormat textureFormat, Boolean mipmaps, UnityEngine.Material materialPropertySource) (at Assets/spine-unity/Modules/AttachmentTools/AttachmentTools.cs:414)
BSpineEquipmentAttacher.Start () (at Assets/Scripts/Player/BSpineEquipmentAttacher.cs:39)
Any ideas? I hope the answer isn't "SpineAnimators are not supported for this pipeline at this time", haha.
Thanks!
22 Jun 2017, 12:16
Oh I should add that the line the error is referring, BSpineEquipmentAttacher line 39, is this:
newSkin = newSkin.GetRepackedSkin("repacked", repackedShader, out runtimeMaterial, out runtimeAtlas);