protected TimelineKey GetTimelineKey(XmlElement element, Animation animation) { int timeline = element.GetInt("timeline", 0); int key = element.GetInt("key", 0); var timelineObj = animation.GetTimeline(timeline); if (timelineObj == null) { Debug.LogError(String.Format( System.Globalization.CultureInfo.InvariantCulture, "Unable to find timeline {0} in animation {1}", timeline, animation.Id)); } return timelineObj.GetKey(key); }