private string GetStatsText() { string str = string.Empty; if ((base.targets.Length == 1) && (this.target as Motion).isHumanMotion) { str = ((str + "Average Velocity: ") + this.m_Clip.averageSpeed.ToString("0.000") + "\nAverage Angular Y Speed: ") + (((this.m_Clip.averageAngularSpeed * 180f) / 3.141593f)).ToString("0.0") + " deg/s"; } if (this.m_ClipInfo != null) { return str; } AnimationClipStats stats = new AnimationClipStats(); stats.Reset(); for (int i = 0; i < base.targets.Length; i++) { AnimationClip clip = base.targets[i] as AnimationClip; if (clip != null) { AnimationClipStats animationClipStats = AnimationUtility.GetAnimationClipStats(clip); stats.Combine(animationClipStats); } } if (str.Length != 0) { str = str + '\n'; } float num2 = (((float) stats.constantCurves) / ((float) stats.totalCurves)) * 100f; float num3 = (((float) stats.denseCurves) / ((float) stats.totalCurves)) * 100f; float num4 = (((float) stats.streamCurves) / ((float) stats.totalCurves)) * 100f; object[] args = new object[] { stats.positionCurves, stats.rotationCurves, stats.scaleCurves, stats.muscleCurves, stats.genericCurves, stats.pptrCurves }; object[] objArray2 = new object[] { stats.totalCurves, stats.constantCurves, num2.ToString("0.0"), stats.denseCurves, num3.ToString("0.0"), stats.streamCurves, num4.ToString("0.0") }; return ((str + string.Format("Curves Pos: {0} Rot: {1} Scale: {2} Muscles: {3} Generic: {4} PPtr: {5}\n", args)) + string.Format("Curves Total: {0}, Constant: {1} ({2}%) Dense: {3} ({4}%) Stream: {5} ({6}%)\n", objArray2) + EditorUtility.FormatBytes(stats.size)); }
private string GetStatsText() { string str = string.Empty; if (this.targets.Length == 1 && (this.target as Motion).isHumanMotion) str = str + "Average Velocity: " + this.m_Clip.averageSpeed.ToString("0.000") + "\nAverage Angular Y Speed: " + ((float) ((double) this.m_Clip.averageAngularSpeed * 180.0 / 3.14159274101257)).ToString("0.0") + " deg/s"; if (this.m_ClipInfo == null) { AnimationClipStats animationClipStats1 = new AnimationClipStats(); animationClipStats1.Reset(); for (int index = 0; index < this.targets.Length; ++index) { AnimationClip target = this.targets[index] as AnimationClip; if ((UnityEngine.Object) target != (UnityEngine.Object) null) { AnimationClipStats animationClipStats2 = AnimationUtility.GetAnimationClipStats(target); animationClipStats1.Combine(animationClipStats2); } } if (str.Length != 0) str += (string) (object) '\n'; float num1 = (float) ((double) animationClipStats1.constantCurves / (double) animationClipStats1.totalCurves * 100.0); float num2 = (float) ((double) animationClipStats1.denseCurves / (double) animationClipStats1.totalCurves * 100.0); float num3 = (float) ((double) animationClipStats1.streamCurves / (double) animationClipStats1.totalCurves * 100.0); str = str + string.Format("Curves Pos: {0} Quaternion: {1} Euler: {2} Scale: {3} Muscles: {4} Generic: {5} PPtr: {6}\n", (object) animationClipStats1.positionCurves, (object) animationClipStats1.quaternionCurves, (object) animationClipStats1.eulerCurves, (object) animationClipStats1.scaleCurves, (object) animationClipStats1.muscleCurves, (object) animationClipStats1.genericCurves, (object) animationClipStats1.pptrCurves) + string.Format("Curves Total: {0}, Constant: {1} ({2}%) Dense: {3} ({4}%) Stream: {5} ({6}%)\n", (object) animationClipStats1.totalCurves, (object) animationClipStats1.constantCurves, (object) num1.ToString("0.0"), (object) animationClipStats1.denseCurves, (object) num2.ToString("0.0"), (object) animationClipStats1.streamCurves, (object) num3.ToString("0.0")) + EditorUtility.FormatBytes(animationClipStats1.size); } return str; }