From 0b94364593529e8b816aa588eddd80e48cfbd254 Mon Sep 17 00:00:00 2001 From: Braedon Date: Thu, 17 Feb 2022 21:59:52 -0500 Subject: [PATCH] Got rid of unnecessary calculations --- Assets/Scripts/LevelEditor/Timeline/TimelineEventObj.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Assets/Scripts/LevelEditor/Timeline/TimelineEventObj.cs b/Assets/Scripts/LevelEditor/Timeline/TimelineEventObj.cs index b880980e..48ac0661 100644 --- a/Assets/Scripts/LevelEditor/Timeline/TimelineEventObj.cs +++ b/Assets/Scripts/LevelEditor/Timeline/TimelineEventObj.cs @@ -83,14 +83,13 @@ namespace RhythmHeavenMania.Editor.Track // thank you to @chrislo27 for suggesting the fix for this. // only renders blocks if they're in view of the timeline viewport - bool visible = rectTransform.IsVisibleFrom(Editor.instance.EditorCamera); var leftSide = rectTransform.localPosition.x; var rightSide = leftSide + rectTransform.sizeDelta.x; var timelineLeftSide = (Timeline.instance.TimelineContent.localPosition.x / 100f) * -1; var timelineRightSide = timelineLeftSide + 10.563f; // what a magic number, i'm sure I could calculate this but I'm lazy - visible = (rightSide >= timelineLeftSide && leftSide <= timelineRightSide); + bool visible = (rightSide >= timelineLeftSide && leftSide <= timelineRightSide); if (visible != lastVisible)