public static void openGUI(SSTUEngineThrustCurveGUI srbModule, string preset, FloatCurve inputCurve) { module = srbModule; id = module.GetInstanceID(); MonoBehaviour.print("ThrustCurveEditor-input curve: " + curve + "\n" + SSTUUtils.printFloatCurve(curve)); presetName = preset; setupCurveData(inputCurve); texture = new Texture2D(graphWidth, graphHeight); updateGraphTexture(); loadPresets(); if (activeGUI == null) { activeGUI = srbModule.gameObject.AddComponent <ThrustCurveEditorGUI>(); SSTULog.debug("Created new gui object: " + activeGUI); } }
public void openThrustCurveGUI() { ThrustCurveEditorGUI.openGUI(this, presetCurveName, currentCurve); }