protected override void OnDestroy() { base.OnDestroy(); _fadeTweener?.Kill(); _scaleTweener?.Kill(); if (_generatedTexture != null) { TextureStaticFactory.ReturnTextureRGBA32(_generatedTexture); _generatedTexture = null; } }
private void ClearCache() { if (_generatedTexture != null) { TextureStaticFactory.ReturnTextureRGBA32(_generatedTexture); _generatedTexture = null; } GraphicExtend.SetAlpha(_rippleSprite, 0); _rippleSprite.sprite = null; if (_mask != null) { Destroy(_mask); _mask = null; } }