Class MaterialSlot | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class MaterialSlot

    Inheritance
    System.Object
    MaterialSlot
    BooleanMaterialSlot
    CubemapMaterialSlot
    DynamicMatrixMaterialSlot
    DynamicValueMaterialSlot
    DynamicVectorMaterialSlot
    GradientMaterialSlot
    Matrix2MaterialSlot
    Matrix3MaterialSlot
    Matrix4MaterialSlot
    SamplerStateMaterialSlot
    Texture2DArrayMaterialSlot
    Texture2DMaterialSlot
    Texture3DMaterialSlot
    Vector1MaterialSlot
    Vector2MaterialSlot
    Vector3MaterialSlot
    Vector4MaterialSlot
    Namespace: UnityEditor.ShaderGraph
    Syntax
    public abstract class MaterialSlot : ISlot

    Constructors

    MaterialSlot()

    Declaration
    protected MaterialSlot()

    MaterialSlot(Int32, String, String, SlotType, Int32, ShaderStageCapability, Boolean)

    Declaration
    protected MaterialSlot(int slotId, string displayName, string shaderOutputName, SlotType slotType, int priority, ShaderStageCapability stageCapability = ShaderStageCapability.All, bool hidden = false)
    Parameters
    Type Name Description
    System.Int32 slotId
    System.String displayName
    System.String shaderOutputName
    SlotType slotType
    System.Int32 priority
    ShaderStageCapability stageCapability
    System.Boolean hidden

    MaterialSlot(Int32, String, String, SlotType, ShaderStageCapability, Boolean)

    Declaration
    protected MaterialSlot(int slotId, string displayName, string shaderOutputName, SlotType slotType, ShaderStageCapability stageCapability = ShaderStageCapability.All, bool hidden = false)
    Parameters
    Type Name Description
    System.Int32 slotId
    System.String displayName
    System.String shaderOutputName
    SlotType slotType
    ShaderStageCapability stageCapability
    System.Boolean hidden

    Properties

    concreteValueType

    Declaration
    public abstract ConcreteSlotValueType concreteValueType { get; }
    Property Value
    Type Description
    ConcreteSlotValueType

    displayName

    Declaration
    public virtual string displayName { get; set; }
    Property Value
    Type Description
    System.String

    hasError

    Declaration
    public bool hasError { get; set; }
    Property Value
    Type Description
    System.Boolean

    hidden

    Declaration
    public bool hidden { get; set; }
    Property Value
    Type Description
    System.Boolean

    id

    Declaration
    public int id { get; }
    Property Value
    Type Description
    System.Int32

    isConnected

    Declaration
    public bool isConnected { get; }
    Property Value
    Type Description
    System.Boolean

    isInputSlot

    Declaration
    public bool isInputSlot { get; }
    Property Value
    Type Description
    System.Boolean

    isOutputSlot

    Declaration
    public bool isOutputSlot { get; }
    Property Value
    Type Description
    System.Boolean

    owner

    Declaration
    public INode owner { get; set; }
    Property Value
    Type Description
    INode

    priority

    Declaration
    public int priority { get; set; }
    Property Value
    Type Description
    System.Int32

    shaderOutputName

    Declaration
    public string shaderOutputName { get; }
    Property Value
    Type Description
    System.String

    slotReference

    Declaration
    public SlotReference slotReference { get; }
    Property Value
    Type Description
    SlotReference

    slotType

    Declaration
    public SlotType slotType { get; }
    Property Value
    Type Description
    SlotType

    stageCapability

    Declaration
    public ShaderStageCapability stageCapability { get; set; }
    Property Value
    Type Description
    ShaderStageCapability

    valueType

    Declaration
    public abstract SlotValueType valueType { get; }
    Property Value
    Type Description
    SlotValueType

    Methods

    AddDefaultProperty(PropertyCollector, GenerationMode)

    Declaration
    public abstract void AddDefaultProperty(PropertyCollector properties, GenerationMode generationMode)
    Parameters
    Type Name Description
    PropertyCollector properties
    GenerationMode generationMode

    ConcreteSlotValueAsVariable(AbstractMaterialNode.OutputPrecision)

    Declaration
    protected virtual string ConcreteSlotValueAsVariable(AbstractMaterialNode.OutputPrecision precision)
    Parameters
    Type Name Description
    AbstractMaterialNode.OutputPrecision precision
    Returns
    Type Description
    System.String

    ConvertConcreteSlotValueTypeToPropertyType(ConcreteSlotValueType)

    Declaration
    protected static PropertyType ConvertConcreteSlotValueTypeToPropertyType(ConcreteSlotValueType slotValue)
    Parameters
    Type Name Description
    ConcreteSlotValueType slotValue
    Returns
    Type Description
    PropertyType

    CopyValuesFrom(MaterialSlot)

    Declaration
    public abstract void CopyValuesFrom(MaterialSlot foundSlot)
    Parameters
    Type Name Description
    MaterialSlot foundSlot

    CreateMaterialSlot(SlotValueType, Int32, String, String, SlotType, Vector4, ShaderStageCapability, Boolean)

    Declaration
    public static MaterialSlot CreateMaterialSlot(SlotValueType type, int slotId, string displayName, string shaderOutputName, SlotType slotType, Vector4 defaultValue, ShaderStageCapability shaderStageCapability = ShaderStageCapability.All, bool hidden = false)
    Parameters
    Type Name Description
    SlotValueType type
    System.Int32 slotId
    System.String displayName
    System.String shaderOutputName
    SlotType slotType
    Vector4 defaultValue
    ShaderStageCapability shaderStageCapability
    System.Boolean hidden
    Returns
    Type Description
    MaterialSlot

    Equals(ISlot)

    Declaration
    public bool Equals(ISlot other)
    Parameters
    Type Name Description
    ISlot other
    Returns
    Type Description
    System.Boolean

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj
    Returns
    Type Description
    System.Boolean

    GetDefaultValue(GenerationMode)

    Declaration
    public virtual string GetDefaultValue(GenerationMode generationMode)
    Parameters
    Type Name Description
    GenerationMode generationMode
    Returns
    Type Description
    System.String

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32

    GetPreviewProperties(List<PreviewProperty>, String)

    Declaration
    public virtual void GetPreviewProperties(List<PreviewProperty> properties, string name)
    Parameters
    Type Name Description
    List<PreviewProperty> properties
    System.String name

    InstantiateControl()

    Declaration
    public virtual VisualElement InstantiateControl()
    Returns
    Type Description
    VisualElement

    IsCompatibleStageWith(MaterialSlot)

    Declaration
    public bool IsCompatibleStageWith(MaterialSlot otherSlot)
    Parameters
    Type Name Description
    MaterialSlot otherSlot
    Returns
    Type Description
    System.Boolean

    IsCompatibleWith(MaterialSlot)

    Declaration
    public bool IsCompatibleWith(MaterialSlot otherSlot)
    Parameters
    Type Name Description
    MaterialSlot otherSlot
    Returns
    Type Description
    System.Boolean

    RawDisplayName()

    Declaration
    public string RawDisplayName()
    Returns
    Type Description
    System.String
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023