docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Class ReflectionUtils

    Utility methods for common reflection-based operations.

    Inheritance
    object
    ReflectionUtils
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Unity.XR.CoreUtils
    Assembly: solution.dll
    Syntax
    public static class ReflectionUtils

    Methods

    Name Description
    FindType(Func<Type, bool>)

    Search all assemblies for a type that matches a given predicate delegate.

    FindTypeByFullName(string)

    Find a type in any assembly by its full name.

    FindTypeInAssemblyByFullName(string, string)

    Searches for a type by assembly simple name and its FullName. an assembly with the given simple name and returns the type with the given full name in that assembly

    FindTypesBatch(List<Func<Type, bool>>, List<Type>)

    Search all assemblies for a set of types that matches any one of a set of predicates.

    FindTypesByFullNameBatch(List<string>, List<Type>)

    Searches all assemblies for a set of types by their FullName strings.

    ForEachAssembly(Action<Assembly>)

    Executes a delegate function for every assembly that can be loaded.

    ForEachType(Action<Type>)

    Executes a delegate function for each type in every assembly.

    GetFieldsWithAttribute(Type, List<FieldInfo>, BindingFlags)

    Get the fields with attributeType in every assembly.

    NicifyVariableName(string)

    Cleans up a variable name for display in UI.

    PreWarmTypeCache()

    Caches type information from all currently loaded assemblies.

    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)