SerializedObjectUtils.CopySerializedObjectToStruct<T> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Iterates through a serialized object's fields and sets any accompanying fields in the supplied struct.
public static T CopySerializedObjectToStruct<T> (UnityEditor.SerializedObject source, T target, string propNamePrefixFilter = default, bool errorOnFieldNotFound = false) where T : struct;
static member CopySerializedObjectToStruct : UnityEditor.SerializedObject * 'T * string * bool -> 'T (requires 'T : struct)
Public Shared Function CopySerializedObjectToStruct(Of T As Structure) (source As SerializedObject, target As T, Optional propNamePrefixFilter As String = Nothing, Optional errorOnFieldNotFound As Boolean = false) As T
Type Parameters
- T
Parameters
- source
- UnityEditor.SerializedObject
- target
- T
- propNamePrefixFilter
- String
Prefix to remove from serialized object field name before searching for match in struct
- errorOnFieldNotFound
- Boolean
Returns
T