void Update()
{
var frame = Time.frameCount;
if (_previousFrame != frame)
{
if (Application.isPlaying && _isRecording)
{
StepRecorder();
Repaint();
}
_previousFrame = frame;
}
}