private void OnDisable() { if (_animating) { StencilFramerate.Release(); } }
private void OnEnable() { if (_animating) { StencilFramerate.Acquire(); } }
private void Update() { var animating = Animating(); if (_animating == animating) { return; } _animating = animating; if (animating) { StencilFramerate.Acquire(); } else { StencilFramerate.Release(); } }