Is it possible to use MaterialPropertyBlock for spine materials? Specifically for materials assigned via CustomSlotMaterials?
And if yes, then how? Normally I'd did something like GetComponent<SpriteRenderer>().SetPropertyBlock(block), but I'm not sure which renderer I am supposed to access in case of spine.
Stranica: 1/1.
DarkTI
2 months ago
-
DarkTI - Postovi: 36
Misaki
Please refer to the "Changing Materials Per Instance" section of the spine-unity documentation, which includes a description of MaterialPropertyBlocks if you have not read this:
spine-unity Runtime Documentation: Changing Materials Per Instance
spine-unity Runtime Documentation: Changing Materials Per Instance
2 months ago
-
Misaki - Postovi: 1152
DarkTI
Thanks, but I'm afraid the article doesn't contain all answers to my question. Which I found out after additional research.
One needs to use GetComponent<MeshRenderer>().SetPropertyBlock(block, index), where index is the index of the material in the list of meshrenderer materials visible in unity inspector at runtime after assigning CustomSlotMaterials.
One needs to use GetComponent<MeshRenderer>().SetPropertyBlock(block, index), where index is the index of the material in the list of meshrenderer materials visible in unity inspector at runtime after assigning CustomSlotMaterials.
1 month ago
-
DarkTI - Postovi: 36
Harald
Your observation is correct. Please note that the required submesh count and order (and thus the material order) may change when you change e.g. attachment visibility or draw order.
1 month ago
-
Harald - Postovi: 4451
Mark topic unread
• Stranica: 1/1.
Natrag na Unity
- Vremenska zona: UTC