AoF

This spine attachment is NSFW. I'm using Spine 3.7.94

When I export this spine project to unity, and I drag it into a scene as a SkeletonAnimation, I can't figure out how to give it a material in the Mesh Renderer script.

https://imgur.com/bXAe0Go

Whenever I change the size of the array to 1, it just resets back to 0. Same thing if I drag the Jessie_Material into the array.

Here's a gif of it happening:

All my other characters get their Material as soon as I drag them onto the scene, but not this one.

---

https://imgur.com/MRqI7yB

---

I'm using Unity Version 2019.1.8f1 (7938dd008a75) Personal

---

I upgraded to the latest spine-unity package and unity Version 2019.2.0f1 (20c1667945cf) Personal and still have the same issue.

---

If I try to drag a material into it as a component (as opposed to in the array), the material is visible for a frame or two, then it just disappears. There are no errors in my console when this happens.

---

I'm going to attach the files that Spine generated to see if that helps others reproduce the issue.

---

Oh yeah: Worth noting that I took this zip all by itself into a brand new project, installed the latest spine-unity plugin, and reproduced the issue I'm describing.
У вас нет необходимых прав для просмотра вложений в этом сообщении.
AoF
  • Сообщения: 49

Harald

This is behaviour as intended, when Initial Skin is set to the default skin, and your default skin is empty (sets no attachments), you end up with the empty material array. When you assign any other skin that contains attachments, your material is assigned.

Note that the materials will always be overwritten by the SkeletonAnimation component. If you want to specify custom Materials per skeleton instance or per slot, you have to use SkeletonRenderer.CustomMaterialOverride via code or the component SkeletonRendererCustomMaterials or material properties as shown in the example scene Spine Examples/Other Examples/Per Instance Material Properties.
Аватара пользователя
Harald

Harri
  • Сообщения: 1028

AoF

Harald писал(а):Note that the materials will always be overwritten by the SkeletonAnimation component.
Hm, ok that's good to know and helped me fix the problem. I spent two days trying to figure out what was going on, but was unable to on my own. Since this material will always be overriden, maybe this part of the UI should be disabled or hidden from the user? Either way, it felt like a bug was happening to me.
AoF
  • Сообщения: 49

Harald

Thanks for the input.

We completely agree that it would be nice to display the property as a greyed-out property with hint text that it will be set by the SkeletonAnimation. Unfortunately the MeshRenderer UI was of course not created by us since it is the built-in Inspector of the Unity component that is displayed here. And hiding the component is not an option, since inspecting the current state quickly can be very helpful.
Аватара пользователя
Harald

Harri
  • Сообщения: 1028


Вернуться в Unity