/* Called once the dummy is let go. Depending on the state of the left glove (overwite or refine), will either overwrite samples with * edited samples or call ApplyRefinement(). */ public void GrabEnd() { if (DMS.LGS_IsInOverwriteState()) { StopAllCoroutines(); DMS.SFS_AdjustSlider("EndSlider", lastSampleIndex - 1, 0f); // force the end slider to align, the minus one comes from lastSampleIndex // incrementing an extra time on last sample DMS.AdjustEndAids(lastSampleIndex - 1); DMS.DS_GoToStart(); } else // Refining { DMS.RGS_StopGuiding(); ApplyRefinement(); } }