void Update() { // For some reason, Unity seems to need one frame to finish the calculation of the lyricsBar position. // In the first frame, the lyrics positions are wrong. Thus, as a workaround, delay the Update code by one frame. delayedAction.CountTimeAndRunDelayed(1, () => { RemoveNotesOutsideOfDisplayArea(); CreateNotesInDisplayArea(); UpdateUiNotePositions(); }); }