Method CreateSerializedInitializationData
CreateSerializedInitializationData(Type, string, object)
Construct a serialized data for the object.
Declaration
public static ObjectInitializationData CreateSerializedInitializationData(Type objectType, string id = null, object dataObject = null)
Parameters
| Type | Name | Description | 
|---|---|---|
| Type | objectType | The type of object to create.  | 
    
| string | id | The object id.  | 
    
| object | dataObject | The serializable object that will be saved into the Data string via the JSONUtility.ToJson method.  | 
    
Returns
| Type | Description | 
|---|---|
| ObjectInitializationData | Contains data used to construct and initialize an object at runtime.  | 
    
CreateSerializedInitializationData<T>(string, object)
Construct a serialized data for the object.
Declaration
public static ObjectInitializationData CreateSerializedInitializationData<T>(string id = null, object dataObject = null)
Parameters
| Type | Name | Description | 
|---|---|---|
| string | id | The ID for the object  | 
    
| object | dataObject | The serializable object that will be saved into the Data string via the JSONUtility.ToJson method.  | 
    
Returns
| Type | Description | 
|---|---|
| ObjectInitializationData | Contains data used to construct and initialize an object at runtime.  | 
    
Type Parameters
| Name | Description | 
|---|---|
| T | The type of object to create.  |