I am dynamically creating SkeletonGraphic GameObject from script. When using SkeletonAnimation, there is a tintBlack field for us to enable TintBlack but I don't see such field under SkeletonGraphic.
How do I enable TintBlack on SkeletonGraphic by script?
- Изменено
You need tomuse the Spine/SkeletonGraphic TintBlack
or Spine/SkeletonGraphic TintBlack CanvasGroup
shaders to enable tint black on a SkeletonGraphic
. See spine-unity Runtime Documentation: SkeletonGraphic Component
Thanks, I know I need to use tint black shader.
The problem is I don't know how to toggle the bool to make it use Tint Black. The visual is incorrect until I toggle the setting from the inspector under the advance section but I am seek way to do it by script. There is no tintBlack field under SkeletonGraphic class for me to enable it.
It is indeed not as comfortably exposed at the SkeletonGraphic
component API. To set it via code you need to use skeletonGraphic.MeshGenerator.settings.tintBlack = true;
.
Thanks