using UnityEngine; using AmazingAssets.AdvancedDissolve; namespace AmazingAssets.AdvancedDissolve.ExampleScripts { public class AnimateCutout : MonoBehaviour { Material material; public float offset; public float time; private void Start() { material = GetComponent().material; AmazingAssets.AdvancedDissolve.AdvancedDissolveProperties.Cutout.Standard.UpdateLocalProperty(material, AdvancedDissolveProperties.Cutout.Standard.Property.Clip, offset); } [ContextMenu("debug cutout")] public void StartCutout() { LeanTween.value(offset, 1, time).setOnUpdate((float x) => { AmazingAssets.AdvancedDissolve.AdvancedDissolveProperties.Cutout.Standard.UpdateLocalProperty(material, AdvancedDissolveProperties.Cutout.Standard.Property.Clip, x); }); } } }