//private static Vector2 presetScrollPos; public static void openGUI(SSTUModularBooster srbModule, FloatCurve inputCurve) { module = srbModule; id = module.GetInstanceID(); MonoBehaviour.print("ThrustCurveEditor-input curve: " + curve + "\n" + SSTUUtils.printFloatCurve(curve)); setupCurveData(inputCurve); texture = new Texture2D(graphWidth, graphHeight); updateGraphTexture(); loadPresets(); }
public static void closeGUI() { sortKeys(true); updateFloatCurve(); module.closeGui(curve, presetName); MonoBehaviour.Destroy(texture); curve = null; module = null; presets = null; curveData.Clear(); }