private void RenderLink(string description, TimelineStateEditorGUI fromState, TimelineStateEditorGUI toState, float edgeFraction)
                {
                    Rect fromStateRect = GetScreenRect(fromState.GetBounds());
                    Rect toStateRect   = GetScreenRect(toState.GetBounds());

                    Vector3 startPos     = new Vector3(fromStateRect.x + fromStateRect.width * edgeFraction, fromStateRect.y + fromStateRect.height - TimelineStateEditorGUI.kShadowSize - 1.0f, 0);
                    Vector3 endPos       = new Vector3(Mathf.Round(toStateRect.x + toStateRect.width / 2.0f) + 0.5f, Mathf.Round(toStateRect.y - kArrowHeight - 1.0f) + 0.5f, 0);
                    Vector3 startTangent = startPos + Vector3.up * 50.0f;
                    Vector3 endTangent   = endPos - Vector3.up * 50.0f;

                    Handles.BeginGUI();
                    Handles.color = _style._linkColor;
                    Handles.DrawBezier(startPos, endPos, startTangent, endTangent, _style._linkColor, EditorUtils.BezierAATexture, 2f);
                    Handles.DrawAAConvexPolygon(new Vector3[] { new Vector3(endPos.x, endPos.y + kArrowHeight, 0.0f), new Vector3(endPos.x + kArrowWidth, endPos.y, 0.0f), new Vector3(endPos.x - kArrowWidth, endPos.y, 0.0f) });
                    Handles.EndGUI();

                    Vector2 textSize     = _style._linkTextStyle.CalcSize(new GUIContent(description));
                    float   lineFraction = edgeFraction;
                    Rect    labelPos     = new Rect(startPos.x + ((endPos.x - startPos.x) * lineFraction) - (textSize.x * 0.5f), startPos.y + ((endPos.y - startPos.y) * lineFraction) - (textSize.y * 0.5f), textSize.x, textSize.y);

                    Color origColor = GUI.backgroundColor;

                    GUI.backgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.35f);
                    GUI.Label(new Rect(labelPos.x + TimelineStateEditorGUI.kShadowSize, labelPos.y + TimelineStateEditorGUI.kShadowSize, labelPos.width, labelPos.height), GUIContent.none, _style._linkTextStyle);

                    GUI.backgroundColor = _style._linkDescriptionColor;
                    GUI.Label(labelPos, description, _style._linkTextStyle);

                    GUI.backgroundColor = origColor;
                }
                private void RenderExternalState(EditorStateLink link, TimelineStateEditorGUI fromState, float edgeFraction)
                {
                    TimelineStateEditorGUI externalState = null;

                    //Find external link for this state
                    foreach (TimelineStateEditorGUI state in _editableObjects)
                    {
                        if (state.IsExternal && state.ExternalStateRef._stateId == link._timeline._stateId && state.ExternalStateRef._file._fileGUID == link._timeline._file._fileGUID)
                        {
                            externalState = state;
                            break;
                        }
                    }

                    //If none exists, create a new one
                    if (externalState == null)
                    {
                        externalState                  = (TimelineStateEditorGUI)AddNewObject(new TimelineState());
                        externalState.IsExternal       = true;
                        externalState.ExternalStateRef = link._timeline;
                        _editableObjects.Add(externalState);
                    }

                    if (!externalState.ExternalHasRendered)
                    {
                        externalState.CalcBounds(_style._noteTextStyle, _style._externalStateTextStyle);
                        bool  selected     = _selectedObjects.Contains(externalState);
                        Color borderColor  = selected ? _style._stateBackgroundSelected : _style._stateBackground;
                        Rect  renderedRect = GetScreenRect(externalState.GetBounds());
                        externalState.Render(renderedRect, borderColor, _style._externalStateColor, _style._noteTextStyle, _style._externalStateTextStyle, selected ? 2.0f : 1.0f);
                        externalState.ExternalHasRendered = true;
                    }

                    RenderLink(link._description, fromState, externalState, edgeFraction);
                }