mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-22 02:06:03 +08:00
[unity] SkeletonGraphic: avoid unnecessary redundant mesh update at color change (necessary after commit c36f847). See #2049.
This commit is contained in:
parent
94eb64ae94
commit
94d8a3a387
@ -155,7 +155,7 @@ namespace Spine.Unity.Editor {
|
|||||||
|
|
||||||
// MaskableGraphic
|
// MaskableGraphic
|
||||||
material = so.FindProperty("m_Material");
|
material = so.FindProperty("m_Material");
|
||||||
color = so.FindProperty("m_Color");
|
color = so.FindProperty("m_SkeletonColor");
|
||||||
raycastTarget = so.FindProperty("m_RaycastTarget");
|
raycastTarget = so.FindProperty("m_RaycastTarget");
|
||||||
maskable = so.FindProperty("m_Maskable");
|
maskable = so.FindProperty("m_Maskable");
|
||||||
|
|
||||||
|
|||||||
@ -60,6 +60,13 @@ namespace Spine.Unity {
|
|||||||
public Material multiplyMaterial;
|
public Material multiplyMaterial;
|
||||||
public Material screenMaterial;
|
public Material screenMaterial;
|
||||||
|
|
||||||
|
/// <summary>Own color to replace <c>Graphic.m_Color</c>.</summary>
|
||||||
|
[UnityEngine.Serialization.FormerlySerializedAs("m_Color")]
|
||||||
|
[SerializeField] protected Color m_SkeletonColor = Color.white;
|
||||||
|
/// <summary>Sets the color of the skeleton. Does not call <see cref="Rebuild"/> and <see cref="UpdateMesh"/>
|
||||||
|
/// unnecessarily as <c>Graphic.color</c> would otherwise do.</summary>
|
||||||
|
override public Color color { get { return m_SkeletonColor; } set { m_SkeletonColor = value; } }
|
||||||
|
|
||||||
[SpineSkin(dataField: "skeletonDataAsset", defaultAsEmptyString: true)]
|
[SpineSkin(dataField: "skeletonDataAsset", defaultAsEmptyString: true)]
|
||||||
public string initialSkinName;
|
public string initialSkinName;
|
||||||
public bool initialFlipX, initialFlipY;
|
public bool initialFlipX, initialFlipY;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user