Slate Forums › Support › CurveEditor Problem in unity 2019.2.13 › Reply To: CurveEditor Problem in unity 2019.2.13
Hello there,
Thanks for letting me know of this problem. The fix is thankfully easy.
Please open up CurveEditor.cs and in the method named “Draw” (close to the end of the file), please change it to this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
public void Draw(Rect posRect, Rect timeRect) { if ( curves == null || curves.Length == 0 ) { GUI.Label(posRect, "No Animation Curves to Display", Styles.centerLabel); return; } var e = Event.current; //* This is the change * // hRangeMax = timeRect.xMax; rect = posRect; shownArea = Rect.MinMaxRect(timeRect.xMin, shownArea.yMin, timeRect.xMax, shownArea.yMax); if ( Prefs.lockHorizontalCurveEditing && e.rawType == EventType.MouseDrag ) { axisLock = 2; } if ( Prefs.snapInterval != lastSnapPref ) { lastSnapPref = Prefs.snapInterval; invSnap = 1 / Prefs.snapInterval; } if ( e.rawType == EventType.MouseUp ) { RecalculateBounds(); if ( GUIUtility.hotControl != 0 ) { OnCurvesUpdated(); } } if ( e.type == EventType.MouseDown && e.button == 0 && e.clickCount == 2 && posRect.Contains(e.mousePosition) ) { FrameClip(true, true); e.Use(); } //INFO GUI.color = new Color(1, 1, 1, 0.2f); var infoWidth = Mathf.Min(posRect.width, 125); var labelRect = new Rect(posRect.xMax - infoWidth - 10, posRect.y + 2, infoWidth, 18); GUI.Label(labelRect, "(F: Frame Selection)"); labelRect.y += 18; GUI.Label(labelRect, "(Click x2: Frame All)"); labelRect.y += 18; GUI.Label(labelRect, "(Alt+: Pan/Zoom)"); GUI.color = Color.white; //OnGUI try { onGUI(); } catch ( Exception exc ) { SelectNone(); Debug.LogException(exc); } } |
Notice, the change is simply commenting out //hRangeMax = timeRect.xMax;
Please let me know if that works for you and thanks again for letting me know.
Join us on Discord: https://discord.gg/97q2Rjh