diff options
author | chai <chaifix@163.com> | 2021-04-12 09:42:52 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-04-12 09:42:52 +0800 |
commit | 6aed8a5cf13145e6291e4e95ee6774d5e5b4b3b8 (patch) | |
tree | 7dc78e64917910dc57f472be9bf5edb610b741d0 /Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Graphics | |
parent | b357a6a6d914e46c2c782f215e9f566f92663850 (diff) |
+effect
Diffstat (limited to 'Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Graphics')
-rw-r--r-- | Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Graphics/Graphic.cs | 2 | ||||
-rw-r--r-- | Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Graphics/MaskableGraphic.cs | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Graphics/Graphic.cs b/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Graphics/Graphic.cs index 53cc1bd..e0d70f3 100644 --- a/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Graphics/Graphic.cs +++ b/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Graphics/Graphic.cs @@ -367,7 +367,7 @@ namespace UnityEngine.UI canvasRenderer.materialCount = 1; canvasRenderer.SetMaterial(materialForRendering, 0); - canvasRenderer.SetTexture(mainTexture); + canvasRenderer.SetTexture(mainTexture); // 设置_MainTex,会覆盖材质上设置的_MainTex } //c 顶点重建 diff --git a/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Graphics/MaskableGraphic.cs b/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Graphics/MaskableGraphic.cs index 4995dc1..51e2fe2 100644 --- a/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Graphics/MaskableGraphic.cs +++ b/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Graphics/MaskableGraphic.cs @@ -101,15 +101,15 @@ namespace UnityEngine.UI { UISystemProfilerApi.AddMarker("MaskableGraphic.cullingChanged", this); m_OnCullStateChanged.Invoke(cull); - SetVerticesDirty(); + SetVerticesDirty(); // 这里需要更新一下canvasRenderer的网格数据 } } public virtual void SetClipRect(Rect clipRect, bool validRect) { if (validRect) - canvasRenderer.EnableRectClipping(clipRect); - else + canvasRenderer.EnableRectClipping(clipRect); + else canvasRenderer.DisableRectClipping(); } |