docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class Node<TInput, TOutput>

    Base class used to implement an import step in an ImporterGraph.

    Inheritance
    object
    Node<TInput, TOutput>
    AddMeshFilterToGameObjectsNode
    AddSkinnedMeshRendererToGameObjectsNode
    BaseMatrixConversionNode<T>
    BuildHierarchyNode
    ComputeNormalsAndTangentsNode
    CreateCameraNode
    CreateDiskLightNode
    CreateDistantLightNode
    CreateEmptyObjectsNode
    CreateMaterialFromMeshColorNode
    CreateMaterialNode
    CreateRectLightNode
    CreateSphereLightNode
    CreateXFormNode
    DisposeUsdImporterNode
    DuplicateVerticesRemovalNode
    ExtractUsdStageMetadataNode
    FilterMeshTypeNode
    FilterMissingHierarchyNode
    FilterPrimsByKindNode
    FilterPrimsByTfTypeNode
    FilterPrimsByUntypedNode
    FilterStageByAppliedSchemaNode
    FilterStageByKindNode
    FilterStageByTfTypeNode
    FilterStageByUntypedNode
    GetTfTypeByNameNode
    IDictionaryAggregatorNode<T>
    IListAggregatorNode<T>
    MapMaterialToMeshNode
    MapTextureToMaterialNode
    PrimsRegexFilterNode
    ReadCameraNode
    ReadDiskLightNode
    ReadDistantLightNode
    ReadMaterialNode
    ReadMeshMaterialDescriptionNode
    ReadMeshNode
    ReadRectLightNode
    ReadReferencesNode
    ReadSkeletonRootNode
    ReadSkinnedMeshNode
    ReadSphereLightNode
    ReadVisibilityNode
    SampleBasisCurvesNode
    SampleNurbsCurvesNode
    UsdStageOpenNode
    WriteMeshNode
    CreateAnimationClipNode
    CreateTextureGenerationSettingsNode
    CreateTextureNode
    ReadBlendShapeWeightAnimationNode
    ReadCameraAnimationNode
    ReadJointXformAnimationNode
    ReadXFormAnimationNode
    ResolveSkelBindingsNode
    TrimTransformPathNode
    Implements
    INode<TInput, TOutput>
    INodeSerialization
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Importer
    Assembly: Unity.Importer.dll
    Syntax
    public abstract class Node<TInput, TOutput> : INode<TInput, TOutput>, INodeSerialization where TInput : InputPorts where TOutput : OutputPorts
    Type Parameters
    Name Description
    TInput

    The type containing all inputs for this import step.

    TOutput

    The type containing all outputs for this import step.

    Remarks

    Inherit from it to implement your own import process step and add them to a graph to drive your import. For example, this node is getting a GameObject as an input, adds a Camera component to it and output the modified GameObject. INSERT-DOCUMENTATION-LINK

    Examples
    using UnityEngine;
    
    [NodeMetadata("CameraNode", 0)]
    public class AddCameraNode : Node<AddCameraNode.MyInputPort, AddCameraNode.MyOutputPort>
    {
        public class MyInputPort : InputPorts
        {
            public GameObject root;
        }
        public class MyOutputPort : OutputPorts
        {
            public GameObject root;
        }
    
        public override void Run()
        {
            GameObject root = Input.root;
            root.AddComponent<Camera>();
            Output.root = root;
        }
    }

    Properties

    Input

    The instance of the class containing all the Inputs required to process the node.

    Declaration
    public TInput Input { get; set; }
    Property Value
    Type Description
    TInput
    Remarks

    The content of this class will be populated by the graph execution and should be used in the Run() method to generate the Output content.

    Output

    The instance of the class containing all the Outputs that the node is creating.

    Declaration
    public TOutput Output { get; set; }
    Property Value
    Type Description
    TOutput
    Remarks

    The content of this class need to be populated during the Run() method based on the content received in the Input.

    Methods

    Run()

    This method has to be implemented for each Node<TInput, TOutput>.

    Declaration
    public abstract void Run()
    Remarks

    During the ImporterGraph execution, this method is responsible for reading content from its Input and populate its Output with its result.

    Implements

    INode<TInput, TOutput>
    INodeSerialization
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)