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)
                   ));
        }
예제 #2
0
        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()));
        }