public static void Init()
    {
        var win = GetWindow<CurveEditorTools>();
        try
        {
            CurveEditorWindowWrapper.GetCurrentCurveEditor();
        }
        catch
        {
            win.Close();
 
        }
    }
    public static void Init()
    {
        var win = GetWindow <CurveEditorTools>();

        try
        {
            CurveEditorWindowWrapper.GetCurrentCurveEditor();
        }
        catch
        {
            Debug.Log("Could not get window");
            //win.Close();
        }
    }
    public static void Init()
    {
        var win = GetWindow <CurveEditorTools>();

        try
        {
            CurveEditorWindowWrapper.GetCurrentCurveEditor();
        }
        catch (Exception e)
        {
            win.Close();
            Debug.Log("error: " + e);
        }
    }