Skip to content

Commit

Permalink
fix: alias name conflict
Browse files Browse the repository at this point in the history
close #198
  • Loading branch information
mob-sakai committed Sep 16, 2024
1 parent 0388cb7 commit 4b847ad
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions Packages/src/Runtime/SoftMask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using UnityEngine.Profiling;
using UnityEngine.Rendering;
using UnityEngine.UI;
using Internal = Coffee.UISoftMaskInternal;
using UISoftMaskInternal = Coffee.UISoftMaskInternal;

namespace Coffee.UISoftMask
{
Expand Down Expand Up @@ -107,7 +107,7 @@ public enum MaskingMode
internal RenderTexture _softMaskBuffer;
private UnityAction _updateParentSoftMask;
private CanvasViewChangeTrigger _viewChangeTrigger;
private List<SoftMask> children => _children != null ? _children : _children = Internal.ListPool<SoftMask>.Rent();
private List<SoftMask> children => _children != null ? _children : _children = UISoftMaskInternal.ListPool<SoftMask>.Rent();

/// <summary>
/// Masking mode.<br />
Expand Down Expand Up @@ -357,7 +357,7 @@ protected override void OnDisable()

protected override void OnDestroy()
{
Internal.ListPool<SoftMask>.Return(ref _children);
UISoftMaskInternal.ListPool<SoftMask>.Return(ref _children);
_onBeforeCanvasRebuild = null;
_renderSoftMaskBuffer = null;
_setSoftMaskDirty = null;
Expand Down Expand Up @@ -416,7 +416,7 @@ protected override void OnValidate()
graphic.SetVerticesDirty();
}

var list = Internal.ListPool<IMaskable>.Rent();
var list = UISoftMaskInternal.ListPool<IMaskable>.Rent();
GetComponents(list);
for (var i = 0; i < list.Count; i++)
{
Expand All @@ -425,7 +425,7 @@ protected override void OnValidate()
list[i].RecalculateMasking();
}

Internal.ListPool<IMaskable>.Return(ref list);
UISoftMaskInternal.ListPool<IMaskable>.Return(ref list);
}
#endif

Expand Down
14 changes: 7 additions & 7 deletions Packages/src/Runtime/Utilities/SoftMaskUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#if TMP_ENABLE
using TMPro;
#endif
using Internal = Coffee.UISoftMaskInternal;
using UISoftMaskInternal = Coffee.UISoftMaskInternal;

namespace Coffee.UISoftMask
{
Expand All @@ -20,17 +20,17 @@ internal static class SoftMaskUtils
/// <summary>
/// Object pool for CommandBuffer instances.
/// </summary>
public static readonly Internal.ObjectPool<CommandBuffer> commandBufferPool =
new Internal.ObjectPool<CommandBuffer>(
public static readonly UISoftMaskInternal.ObjectPool<CommandBuffer> commandBufferPool =
new UISoftMaskInternal.ObjectPool<CommandBuffer>(
() => new CommandBuffer(),
x => x != null,
x => x.Clear());

/// <summary>
/// Object pool for MaterialPropertyBlock instances.
/// </summary>
public static readonly Internal.ObjectPool<MaterialPropertyBlock> materialPropertyBlockPool =
new Internal.ObjectPool<MaterialPropertyBlock>(
public static readonly UISoftMaskInternal.ObjectPool<MaterialPropertyBlock> materialPropertyBlockPool =
new UISoftMaskInternal.ObjectPool<MaterialPropertyBlock>(
() => new MaterialPropertyBlock(),
x => x != null,
x => x.Clear());
Expand Down Expand Up @@ -89,7 +89,7 @@ private static void InitializeOnLoadMethod()
#if TMP_ENABLE
private static void UpdateSubMeshUI(TextMeshProUGUI text, bool show, float aa, MinMax01 softness)
{
var subMeshes = Internal.ListPool<TMP_SubMeshUI>.Rent();
var subMeshes = UISoftMaskInternal.ListPool<TMP_SubMeshUI>.Rent();
text.GetComponentsInChildren(subMeshes, 1);

for (var i = 0; i < subMeshes.Count; i++)
Expand All @@ -101,7 +101,7 @@ private static void UpdateSubMeshUI(TextMeshProUGUI text, bool show, float aa, M
maskingShape.showMaskGraphic = show;
}

Internal.ListPool<TMP_SubMeshUI>.Return(ref subMeshes);
UISoftMaskInternal.ListPool<TMP_SubMeshUI>.Return(ref subMeshes);
}
#endif

Expand Down

0 comments on commit 4b847ad

Please sign in to comment.