docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Method GetFieldsRecursively

    GetFieldsRecursively(Type, List<FieldInfo>, BindingFlags)

    Gets all fields of the Type or any of its base Types.

    Declaration
    public static void GetFieldsRecursively(this Type type, List<FieldInfo> fields, BindingFlags bindingAttr = BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)
    Parameters
    Type Name Description
    Type type

    Type we are going to get fields on.

    List<FieldInfo> fields

    A list to which all fields of this type will be added.

    BindingFlags bindingAttr

    A bitmask specifying how the search is conducted.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)