using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Spine.Unity;
using Spine;
using Spine.Unity.Modules.AttachmentTools;
public class Attachment : MonoBehaviour
{
public Sprite sprits;
public Material materialWithSettingsYouWant;
[SpineSlot] public string slot;
SkeletonAnimation skeletonAnimation;
void Start()
{
skeletonAnimation = GetComponent<SkeletonAnimation>();
// first, make sure to add using Spine.Unity.Modules.AttachmentTools; on top of your script
Slot _slot = skeletonAnimation.Skeleton.FindSlot(slot);
RegionAttachment _attachment = sprits.ToRegionAttachment(materialWithSettingsYouWant);
[b][u]//slot.Attachment = _attachment; <- error[/u][/b]
}
}
how do change?
Unity3d 2018.3 and 2017.3 test + spine 3.7
slot.Attachment <- Attachment not found parameter
slot.Attachment is not found...