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 FieldInstance

    A FieldInstance is a class that wraps a FieldInfo and a reference. It can be seen as the representation on a field on one particular object instance. This enables an easy serialization / deserialization mechanism through dictionnaries. Dictionnaries are great as they allow to store multiple levels of data and structures such as structs, classes, arrays, or base types. Unity is bad at serializing multiple levels of data and doesn't handles polymorphism. Dictionnaries also fix thoses issues.

    Inheritance
    System.Object
    FieldInstance
    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.Tools
    Assembly: cs.temp.dll.dll
    Syntax
    public sealed class FieldInstance

    Constructors

    FieldInstance(FieldInfo, Object)

    Declaration
    public FieldInstance(FieldInfo fieldInfo, object reference)
    Parameters
    Type Name Description
    FieldInfo fieldInfo
    System.Object reference

    FieldInstance(FieldInfo, Object, MethodInfo, MethodInfo)

    Declaration
    public FieldInstance(FieldInfo fieldInfo, object reference, MethodInfo visibilityCheck, MethodInfo enablingCheck)
    Parameters
    Type Name Description
    FieldInfo fieldInfo
    System.Object reference
    MethodInfo visibilityCheck
    MethodInfo enablingCheck

    FieldInstance(FieldInfo, Object, String, String, String, String)

    Declaration
    public FieldInstance(FieldInfo fieldInfo, object reference, string visibilityCheck = null, string enablingCheck = null, string tooltip = null, string displayName = null)
    Parameters
    Type Name Description
    FieldInfo fieldInfo
    System.Object reference
    System.String visibilityCheck
    System.String enablingCheck
    System.String tooltip
    System.String displayName

    Fields

    enablingCheck

    Declaration
    public readonly MethodInfo enablingCheck
    Field Value
    Type Description
    MethodInfo

    fieldInfo

    Declaration
    public readonly FieldInfo fieldInfo
    Field Value
    Type Description
    FieldInfo

    name

    Declaration
    public readonly string name
    Field Value
    Type Description
    System.String

    reference

    Declaration
    public readonly object reference
    Field Value
    Type Description
    System.Object

    tooltip

    Declaration
    public readonly string tooltip
    Field Value
    Type Description
    System.String

    visibilityCheck

    Declaration
    public readonly MethodInfo visibilityCheck
    Field Value
    Type Description
    MethodInfo

    Properties

    type

    Returns the field type

    Declaration
    public Type type { get; }
    Property Value
    Type Description
    System.Type

    value

    Returns the instance value

    Declaration
    public object value { get; set; }
    Property Value
    Type Description
    System.Object

    Methods

    deserializeData(Dictionary<String, String>)

    Unloads the data of the given dictionnary into the object field instance

    Declaration
    public void deserializeData(Dictionary<string, string> pairs)
    Parameters
    Type Name Description
    System.Collections.Generic.Dictionary<System.String, System.String> pairs

    serializeData(ref Dictionary<String, String>)

    Fills the referenced dictionnary with serialized data (recursively if the type is complex)

    Declaration
    public void serializeData(ref Dictionary<string, string> pairs)
    Parameters
    Type Name Description
    System.Collections.Generic.Dictionary<System.String, System.String> pairs
    Back to top PiXYZ Plugin for Unity 2019.1