mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-02 21:59:09 +08:00
[unity] Fixed endless loop in Unity Editor when updating assets due to stencil parameter auto-update. Closes #1371.
This commit is contained in:
parent
f8ea06048c
commit
5a2ba8dd33
@ -122,6 +122,9 @@ namespace Spine.Unity {
|
|||||||
public const UnityEngine.Rendering.CompareFunction STENCIL_COMP_MASKINTERACTION_VISIBLE_INSIDE = UnityEngine.Rendering.CompareFunction.LessEqual;
|
public const UnityEngine.Rendering.CompareFunction STENCIL_COMP_MASKINTERACTION_VISIBLE_INSIDE = UnityEngine.Rendering.CompareFunction.LessEqual;
|
||||||
/// <summary>Shader property value used as Stencil comparison function for <see cref="SpriteMaskInteraction.VisibleOutsideMask"/>.</summary>
|
/// <summary>Shader property value used as Stencil comparison function for <see cref="SpriteMaskInteraction.VisibleOutsideMask"/>.</summary>
|
||||||
public const UnityEngine.Rendering.CompareFunction STENCIL_COMP_MASKINTERACTION_VISIBLE_OUTSIDE = UnityEngine.Rendering.CompareFunction.Greater;
|
public const UnityEngine.Rendering.CompareFunction STENCIL_COMP_MASKINTERACTION_VISIBLE_OUTSIDE = UnityEngine.Rendering.CompareFunction.Greater;
|
||||||
|
#if UNITY_EDITOR
|
||||||
|
private static bool haveStencilParametersBeenFixed = false;
|
||||||
|
#endif
|
||||||
#endif // #if BUILT_IN_SPRITE_MASK_COMPONENT
|
#endif // #if BUILT_IN_SPRITE_MASK_COMPONENT
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@ -532,8 +535,10 @@ namespace Spine.Unity {
|
|||||||
|
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
private void EditorFixStencilCompParameters() {
|
private void EditorFixStencilCompParameters() {
|
||||||
if (HasAnyStencilComp0Material())
|
if (!haveStencilParametersBeenFixed && HasAnyStencilComp0Material()) {
|
||||||
|
haveStencilParametersBeenFixed = true;
|
||||||
FixAllProjectMaterialsStencilCompParameters();
|
FixAllProjectMaterialsStencilCompParameters();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void FixAllProjectMaterialsStencilCompParameters() {
|
private void FixAllProjectMaterialsStencilCompParameters() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user