public void RefreshAnimatedState(AnimationHierarchyData data, Transform tr) { this.m_Animated = false; string path = AnimationUtility.CalculateTransformPath(tr, data.animated.transform); foreach (int num in data.animatedPaths.Keys) { if (num == CurveUtility.GetPathAndTypeID(path, this.obj.GetType())) { this.m_Animated = true; break; } } }
private void SetAnimationCurves() { this.m_AnimatedCurves = new Hashtable(); this.m_AnimatedPaths = new Hashtable(); this.m_LeftoverCurves = new Hashtable(); if (this.clip != null) { EditorCurveBinding[] curveBindings = AnimationUtility.GetCurveBindings(this.clip); EditorCurveBinding[] array = curveBindings; for (int i = 0; i < array.Length; i++) { EditorCurveBinding editorCurveBinding = array[i]; int curveID = CurveUtility.GetCurveID(this.clip, editorCurveBinding); this.m_AnimatedCurves[curveID] = true; if (!this.CheckIfPropertyExists(editorCurveBinding)) { this.m_LeftoverCurves[editorCurveBinding] = editorCurveBinding; } else { this.m_AnimatedPaths[CurveUtility.GetPathAndTypeID(editorCurveBinding.path, editorCurveBinding.type)] = true; string text = editorCurveBinding.path; while (true) { int hashCode = text.GetHashCode(); if (this.m_AnimatedPaths.Contains(hashCode)) { break; } this.m_AnimatedPaths[hashCode] = true; if (text.Length == 0) { break; } int num = text.LastIndexOf('/'); if (num > 0) { text = text.Substring(0, num); } else { text = string.Empty; } } } } } }