diff options
author | chai <chaifix@163.com> | 2021-04-07 21:13:03 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-04-07 21:13:03 +0800 |
commit | d69611d66431e28ea35477c6781a00d57ae04fa3 (patch) | |
tree | c76b3147642a6d1749406f25f2fdacce4ba7a272 /Assets/Test/UIEffect/Program/UISyncEffect.cs | |
parent | c7e2d8f773baa3955f17402b842eb43329c5f3a0 (diff) |
*因为没有meta,导致missing,删除UIEffect
Diffstat (limited to 'Assets/Test/UIEffect/Program/UISyncEffect.cs')
-rw-r--r-- | Assets/Test/UIEffect/Program/UISyncEffect.cs | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/Assets/Test/UIEffect/Program/UISyncEffect.cs b/Assets/Test/UIEffect/Program/UISyncEffect.cs deleted file mode 100644 index ada9be8..0000000 --- a/Assets/Test/UIEffect/Program/UISyncEffect.cs +++ /dev/null @@ -1,83 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.UI; - - -namespace Coffee.UIEffects -{ - /// <summary> - /// Dissolve effect for uGUI. - /// </summary> - [ExecuteInEditMode] - public class UISyncEffect : BaseMaterialEffect - { - [Tooltip("The target effect to synchronize.")] [SerializeField] - private BaseMeshEffect m_TargetEffect; - - public BaseMeshEffect targetEffect - { - get { return m_TargetEffect != this ? m_TargetEffect : null; } - set - { - if (m_TargetEffect == value) return; - m_TargetEffect = value; - - SetVerticesDirty(); - SetMaterialDirty(); - SetEffectParamsDirty(); - } - } - - protected override void OnEnable() - { - if (targetEffect) - targetEffect.syncEffects.Add(this); - base.OnEnable(); - } - - protected override void OnDisable() - { - if (targetEffect) - targetEffect.syncEffects.Remove(this); - base.OnDisable(); - } - - public override Hash128 GetMaterialHash(Material baseMaterial) - { - if (!isActiveAndEnabled) return k_InvalidHash; - - var matEffect = targetEffect as BaseMaterialEffect; - if (!matEffect || !matEffect.isActiveAndEnabled) return k_InvalidHash; - - return matEffect.GetMaterialHash(baseMaterial); - } - - public override void ModifyMaterial(Material newMaterial, Graphic graphic) - { - if (!isActiveAndEnabled) return; - - var matEffect = targetEffect as BaseMaterialEffect; - if (!matEffect || !matEffect.isActiveAndEnabled) return; - - matEffect.ModifyMaterial(newMaterial, graphic); - } - - public override void ModifyMesh(VertexHelper vh, Graphic graphic) - { - if (!isActiveAndEnabled) return; - if (!targetEffect || !targetEffect.isActiveAndEnabled) return; - - targetEffect.ModifyMesh(vh, graphic); - } - -#if UNITY_EDITOR - protected override void OnValidate() - { - SetVerticesDirty(); - SetMaterialDirty(); - SetEffectParamsDirty(); - } -#endif - } -} |