暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

EnumerableExtensions.cs 565B

1234567891011121314151617181920212223
  1. #if UNITY_EDITOR
  2. using System;
  3. using System.Collections.Generic;
  4. namespace UnityEngine.InputSystem.Editor
  5. {
  6. internal static class EnumerableExtensions
  7. {
  8. public static void ForEach<T>(this IEnumerable<T> enumerable, Action<T, int> action)
  9. {
  10. int index = 0;
  11. foreach (var item in enumerable)
  12. action(item, index++);
  13. }
  14. public static string Join<T>(this IEnumerable<T> enumerable, string separator)
  15. {
  16. return string.Join(separator, enumerable);
  17. }
  18. }
  19. }
  20. #endif