Version: 
  • C# API

    Show / Hide Table of Contents
    • PiXYZ
      • CoreLoadingException
      • NoValidLicenseException
      • OutOfTermsException
      • PiXYZDefinesManager
      • PiXYZException
    • PiXYZ.Config
      • Compatibility
      • Configuration
      • LicenseServer
      • Token
      • WebLicense
    • PiXYZ.Editor
      • AboutWindow
      • ColoredTheme
      • ColorType
      • DispatcherEditor
      • EditorExtensions
      • EditorGUIExtensions
      • IProgressBar
      • LicensingWindow
      • NonPersistentSerializer
      • PrefabDependenciesDestination
      • Preferences
      • ProgressBar
      • ScriptedImporterBehaviour
      • SingletonEditorWindow
      • StaticStyles
      • TextureCache
      • UpdateWindow
    • PiXYZ.Import
      • ExceptionHandler
      • Formats
      • Importer
      • ImportSettings
      • ImportSettingsTemplate
      • ImportStamp
      • LodGenerationSettings
      • LodGroupPlacement
      • LodQuality
      • LodsGenerationSettings
      • Metadata
      • Parameter<T>
      • ParameterAvailability
      • SubProcess
      • TransformVariant
      • VariantSets
      • VariantSets.MaterialSet
      • VariantSets.Set
      • VariantSets.Set<T, U>
      • VariantSets.TransformSet
      • VariantSets.VariantGroup
      • VariantSets.VariantSet
      • VariantSets.VariantStructure
      • VariantsManager
      • VariantsManager.MaterialSwitch
      • VariantsManager.Switch
      • VariantsManager.Switch<T>
      • VariantsManager.TransformSwitch
    • PiXYZ.Import.Editor
      • DropInSceneImporter
      • ImportSettingsEditor
      • ImportStampEditor
      • ImportWindow
      • LODsSettingsDrawer
      • MetadataEditor
      • PostProcessor
      • PostprocessVRED
      • PreprocessVRED
      • ScriptedImporter
      • ScriptedImporterAttribute
      • ScriptedImporterEditor
    • PiXYZ.Tools
      • ActionBase
      • ActionIn<Input>
      • ActionInOut<Input, Output>
      • ActionOut<Output>
      • FieldInstance
      • FieldInstanceSerializer
      • FilterParameter
      • FreePassAction
      • HelperMethod
      • IRenamable
      • PrefabModificationException
      • Rule
      • RuleBlock
      • RuleSet
      • ToolboxMenuItems
      • ToolsBase
      • UserParameter
    • PiXYZ.Tools.Builtin
      • AddChild
      • AddChild.Placement
      • AddCollider
      • AddCollider.ColliderType
      • AddLight
      • AddRigidbody
      • CreateLightmapUVs
      • CreateNormals
      • CreateUVs
      • Decimate
      • Decimate.DecimationCriterion
      • Decimate.DecimationQuality
      • Delete
      • ExplodeSubmeshes
      • FilterOnLayer
      • FilterOnMaterial
      • FilterOnMaterial.StringConstrain
      • FilterOnMetadata
      • FilterOnMetadata.PropName
      • FilterOnMetadata.PropName.PropertyNameConstrain
      • FilterOnMetadata.PropValue
      • FilterOnMetadata.PropValue.PropertyValueConstrain
      • FilterOnName
      • FilterOnName.StringConstrain
      • FilterOnPosition
      • FilterOnPosition.BoundsCondition
      • FilterOnTag
      • FlipNormals
      • GetAllGameObjects
      • GetChildAt
      • GetChildren
      • GetGameObject
      • GetImportedModel
      • GetLatestImportedModel
      • GetSelectedGameObjects
      • Merge
      • MoveOrigin
      • MoveOrigin.MovePivotOption
      • PrintGameObjectsInfo
      • PrintMaterialsInfo
      • PrintMeshesInfo
      • RandomizeTransform
      • RemoveHidden
      • RemoveHidden.SelectionLevelUnity
      • RepairMesh
      • ReplaceBy
      • ReplaceBy.ReplaceByMode
      • Retopologize
      • Retopologize.MeshReconstructionQuality
      • Retopologize.RetopologyMode
      • SetAsStatic
      • SetEnabled
      • SetLayer
      • SetMaterial
      • SetMesh
      • SetMetadata
      • SetName
      • SetPosition
      • SetPosition.Referential
      • SetTag
      • SwitchMaterials
      • SwitchMaterials.CopyReplace
      • SwitchMaterials.MaterialRemplacement
      • TextureQuality
    • PiXYZ.Tools.Editor
      • CoreContext
      • FieldInstanceDrawer
      • RenamePopup
      • RuleEngineMenu
      • RuleSetEditor
      • RuleSetWindow
      • Toolbox
      • ToolboxWindow
      • ToolsEditor
    • PiXYZ.Utils
      • BaseExtensions
      • CollectionExtensions
      • Dispatcher
      • Dispatcher.DelayedAction
      • Dispatcher.DelayFramesDispatch
      • Dispatcher.GoMainThreadDispatch
      • Dispatcher.GoThreadPoolDispatch
      • Dispatcher.SleepForSecondsDispatch
      • Dispatcher.WaitForSecondsDispatch
      • Dispatcher.YieldInstruction
      • DynamicEnum
      • FilePath
      • FloatingMesh
      • GameObjectToVoidHandler
      • GenericRenderer
      • LookupTable<K, V>
      • MergingContainer
      • MeshExtensions
      • Profiler
      • Profiling
      • ProgressHandler
      • Range
      • ReflectionExtensions
      • SceneExtensions
      • StringToStringHandler
      • TextureScaler
      • ThreadQueue
      • TypePathToUnityObject
      • UnityObjectToStringHandler
      • UnityObjectToUnityObjectHandler
      • VerticesData
      • VoidHandler

    Class ReflectionExtensions

    Inheritance
    System.Object
    ReflectionExtensions
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: PiXYZ.Utils
    Assembly: cs.temp.dll.dll
    Syntax
    public static class ReflectionExtensions

    Methods

    CreateListOfType(Type)

    Returns an 0 size IList of the given type. This method is similar to new List<T> but allows to pass a type reference instead.

    Declaration
    public static IList CreateListOfType(Type type)
    Parameters
    Type Name Description
    System.Type type
    Returns
    Type Description
    System.Collections.Generic.IList

    GetAllDerivedTypes<T>(AppDomain)

    Returns all derives types for a given Type in the given AppDomain

    Declaration
    public static List<Type> GetAllDerivedTypes<T>(this AppDomain appDomain)
    Parameters
    Type Name Description
    System.AppDomain appDomain
    Returns
    Type Description
    System.Collections.Generic.List<System.Type>
    Type Parameters
    Name Description
    T

    GetFieldValue<T>(Object, String)

    Returns a field value from the property name and type using reflection.

    Declaration
    public static T GetFieldValue<T>(this object obj, string fieldName)
    Parameters
    Type Name Description
    System.Object obj
    System.String fieldName
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    GetInstanceFields(Type)

    Returns all public instance field of a given type.

    Declaration
    public static FieldInfo[] GetInstanceFields(this Type type)
    Parameters
    Type Name Description
    System.Type type
    Returns
    Type Description
    FieldInfo[]

    GetPropertyValue<T>(Object, String)

    Returns a property value from the property name and type using reflection.

    Declaration
    public static T GetPropertyValue<T>(this object obj, string propertyName)
    Parameters
    Type Name Description
    System.Object obj
    System.String propertyName
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    HasAttribute<AttributeType>(MemberInfo)

    Returns True if the given member has at least one Attribute of the given attribute type.

    Declaration
    public static bool HasAttribute<AttributeType>(this MemberInfo memberInfo)
    Parameters
    Type Name Description
    MemberInfo memberInfo

    Member

    Returns
    Type Description
    System.Boolean
    Type Parameters
    Name Description
    AttributeType

    Attribute Type

    HasAttribute<AttributeType>(MemberInfo, out AttributeType)

    Returns True if the given member has at least one Attribute of the given attribute type.

    Declaration
    public static bool HasAttribute<AttributeType>(this MemberInfo memberInfo, out AttributeType attribute)
    Parameters
    Type Name Description
    MemberInfo memberInfo

    Member

    AttributeType attribute

    Out parameter for attribute found

    Returns
    Type Description
    System.Boolean
    Type Parameters
    Name Description
    AttributeType

    Attribute Type

    HasAttribute<AttributeType>(Type)

    Returns True if the given type has at least one Attribute of the given attribute type.

    Declaration
    public static bool HasAttribute<AttributeType>(this Type type)
    Parameters
    Type Name Description
    System.Type type

    Object Type

    Returns
    Type Description
    System.Boolean
    Type Parameters
    Name Description
    AttributeType

    Attribute Type

    IsIList(Type)

    Returns true if the given type is of the type IList.

    Declaration
    public static bool IsIList(this Type type)
    Parameters
    Type Name Description
    System.Type type
    Returns
    Type Description
    System.Boolean

    SetFieldValue<T>(Object, String, T)

    Sets a field value from the property name and type using reflection.

    Declaration
    public static void SetFieldValue<T>(this object obj, string fieldName, T value)
    Parameters
    Type Name Description
    System.Object obj
    System.String fieldName
    T value
    Type Parameters
    Name Description
    T

    SetPropertyValue<T>(Object, String, T)

    Sets a property value from the property name and type using reflection.

    Declaration
    public static void SetPropertyValue<T>(this object obj, string propertyName, T value)
    Parameters
    Type Name Description
    System.Object obj
    System.String propertyName
    T value
    Type Parameters
    Name Description
    T
    Back to top PiXYZ Plugin for Unity 2019.1