Class ImporterGraph
This class represents an import process as a graph. INSERT-DOCUMENTATION-LINK
Inherited Members
Namespace: UnityEngine.Importer
Assembly: Unity.Importer.dll
Syntax
public class ImporterGraph : ScriptableObject
  Properties
Edges
List of all Edge added to the ImporterGraph.
Declaration
public IReadOnlyList<Edge> Edges { get; }
  Property Value
| Type | Description | 
|---|---|
| IReadOnlyList<Edge> | 
ImportConstants
List of all ImportConstant<T> added to the ImporterGraph.
Declaration
public IReadOnlyList<IConstantValue> ImportConstants { get; }
  Property Value
| Type | Description | 
|---|---|
| IReadOnlyList<IConstantValue> | 
ImportSettings
List of all ImportSetting<T> added to the ImporterGraph.
Declaration
public IReadOnlyList<IGraphValue> ImportSettings { get; }
  Property Value
| Type | Description | 
|---|---|
| IReadOnlyList<IGraphValue> | 
MainResult
The first ResultEdge of the ResultEdges or default if empty.
Declaration
public ResultEdge MainResult { get; }
  Property Value
| Type | Description | 
|---|---|
| ResultEdge | 
Nodes
List of all Node<TInput, TOutput> added to the ImporterGraph.
Declaration
public IReadOnlyList<INode<InputPorts, OutputPorts>> Nodes { get; }
  Property Value
| Type | Description | 
|---|---|
| IReadOnlyList<INode<InputPorts, OutputPorts>> | 
ResultEdges
List of all ResultEdge added to the ImporterGraph.
Declaration
public IReadOnlyList<ResultEdge> ResultEdges { get; }
  Property Value
| Type | Description | 
|---|---|
| IReadOnlyList<ResultEdge> | 
SettingEdges
List of all SettingEdge added to the ImporterGraph.
Declaration
public IReadOnlyList<SettingEdge> SettingEdges { get; }
  Property Value
| Type | Description | 
|---|---|
| IReadOnlyList<SettingEdge> | 
Methods
AddEdge(Edge)
Add a valid Edge to the ImporterGraph.
Declaration
public GraphValidationResult AddEdge(Edge edge)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Edge | edge | The Edge to add.  | 
      
Returns
| Type | Description | 
|---|---|
| GraphValidationResult | The GraphValidationResult of this command.  | 
      
AddImportConstant(IConstantValue)
Adds a ImportConstant<T> to the ImporterGraph.
Declaration
public GraphValidationResult AddImportConstant(IConstantValue constant)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IConstantValue | constant | The ImportConstant<T> to add.  | 
      
Returns
| Type | Description | 
|---|---|
| GraphValidationResult | The GraphValidationResult of this command.  | 
      
AddImportSetting(IGraphValue)
Add a new ImportSetting<T> in the ImporterGraph.
Declaration
public GraphValidationResult AddImportSetting(IGraphValue setting)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IGraphValue | setting | The new setting to add to the ImporterGraph.  | 
      
Returns
| Type | Description | 
|---|---|
| GraphValidationResult | The GraphValidationResult of this command.  | 
      
Remarks
While the method is asking for an IGraphValue, we've pre-implemented a base class for serialization purpose the makes this API easier to deal with. See ImportSetting<T>.
AddNode(INode<InputPorts, OutputPorts>)
Add a valid INode<TInput, TOutput> to the ImporterGraph.
Declaration
public GraphValidationResult AddNode(INode<InputPorts, OutputPorts> node)
  Parameters
| Type | Name | Description | 
|---|---|---|
| INode<InputPorts, OutputPorts> | node | The INode<TInput, TOutput> to add.  | 
      
Returns
| Type | Description | 
|---|---|
| GraphValidationResult | The GraphValidationResult of this command.  | 
      
AddResultEdge(ResultEdge)
Adds a ResultEdge to the ImporterGraph.
Declaration
public GraphValidationResult AddResultEdge(ResultEdge edge)
  Parameters
| Type | Name | Description | 
|---|---|---|
| ResultEdge | edge | The ResultEdge to add.  | 
      
Returns
| Type | Description | 
|---|---|
| GraphValidationResult | The GraphValidationResult of this command.  | 
      
AddSettingEdge(SettingEdge)
Adds a SettingEdge to the ImporterGraph.
Declaration
public GraphValidationResult AddSettingEdge(SettingEdge edge)
  Parameters
| Type | Name | Description | 
|---|---|---|
| SettingEdge | edge | The SettingEdge to add.  | 
      
Returns
| Type | Description | 
|---|---|
| GraphValidationResult | The GraphValidationResult of this command.  | 
      
RemoveEdge(Edge)
Remove a valid Edge from the ImporterGraph.
Declaration
public GraphValidationResult RemoveEdge(Edge edge)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Edge | edge | The Edge to remove.  | 
      
Returns
| Type | Description | 
|---|---|
| GraphValidationResult | The GraphValidationResult of this command.  | 
      
RemoveImportConstant(IConstantValue)
Removes a ImportConstant<T> from the ImporterGraph.
Declaration
public GraphValidationResult RemoveImportConstant(IConstantValue constant)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IConstantValue | constant | The ImportConstant<T> to remove.  | 
      
Returns
| Type | Description | 
|---|---|
| GraphValidationResult | The GraphValidationResult of this command.  | 
      
RemoveImportSetting(IGraphValue)
Removes an ImportSetting<T> from the ImporterGraph.
Declaration
public GraphValidationResult RemoveImportSetting(IGraphValue setting)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IGraphValue | setting | The existing ImportSetting<T> to remove.  | 
      
Returns
| Type | Description | 
|---|---|
| GraphValidationResult | The GraphValidationResult of this command.  | 
      
Remarks
It's possible to gather all existing settings in the current ImporterGraph through ImportSettings.
RemoveNode(INode<InputPorts, OutputPorts>)
Remove a valid INode<TInput, TOutput> from the ImporterGraph.
Declaration
public GraphValidationResult RemoveNode(INode<InputPorts, OutputPorts> node)
  Parameters
| Type | Name | Description | 
|---|---|---|
| INode<InputPorts, OutputPorts> | node | The INode<TInput, TOutput> to remove.  | 
      
Returns
| Type | Description | 
|---|---|
| GraphValidationResult | The GraphValidationResult of this command.  | 
      
RemoveResultEdge(ResultEdge)
Remove a ResultEdge from the ImporterGraph.
Declaration
public GraphValidationResult RemoveResultEdge(ResultEdge edge)
  Parameters
| Type | Name | Description | 
|---|---|---|
| ResultEdge | edge | The ResultEdge to remove.  | 
      
Returns
| Type | Description | 
|---|---|
| GraphValidationResult | The GraphValidationResult of this command.  | 
      
RemoveSettingEdge(SettingEdge)
Remove a SettingEdge from the ImporterGraph.
Declaration
public GraphValidationResult RemoveSettingEdge(SettingEdge edge)
  Parameters
| Type | Name | Description | 
|---|---|---|
| SettingEdge | edge | The SettingEdge to remove.  | 
      
Returns
| Type | Description | 
|---|---|
| GraphValidationResult | The GraphValidationResult of this command.  | 
      
SetMainResultEdge(ResultEdge)
Set an existing ResultEdge in the graph as the main result of the ImporterGraph.
Declaration
public GraphValidationResult SetMainResultEdge(ResultEdge edge)
  Parameters
| Type | Name | Description | 
|---|---|---|
| ResultEdge | edge | The ResultEdge to set as main result.  | 
      
Returns
| Type | Description | 
|---|---|
| GraphValidationResult | The GraphValidationResult of this command.  | 
      
Remarks
This method effectively set edge as the first ResultEdge of the ResultEdges.
Validate()
Validate this ImporterGraph.
Declaration
public GraphValidationResult Validate()
  Returns
| Type | Description | 
|---|---|
| GraphValidationResult | The GraphValidationResult of this validation.  |