protected virtual IEnumerable <MemberInfo> GetMembers(Type type) { var bindingFlags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic; return(LinqUtility.Concat <MemberInfo> ( type.GetFields(bindingFlags).Where(IncludeField), type.GetProperties(bindingFlags).Where(IncludeProperty) )); }
private static IEnumerable <object> FindAllAssetStubs() { return(UnityAPI.Await(() => LinqUtility.Concat <object> ( AssetUtility.FindAllAssetsOfType <IAotStubbable>() .SelectMany(aot => aot.aotStubs), AssetUtility.FindAllAssetsOfType <GameObject>() .SelectMany(go => go.GetComponents <IAotStubbable>() .SelectMany(component => component.aotStubs)) ).ToArray())); }