Class MaterialSlot
Inheritance
System.Object
MaterialSlot
Syntax
public abstract class MaterialSlot : ISlot
Constructors
MaterialSlot()
Declaration
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
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
Property Value
Type |
Description |
System.Int32 |
|
isConnected
Declaration
public bool isConnected { get; }
Property Value
Type |
Description |
System.Boolean |
|
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
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
valueType
Declaration
public abstract SlotValueType valueType { get; }
Property Value
Methods
AddDefaultProperty(PropertyCollector, GenerationMode)
Declaration
public abstract void AddDefaultProperty(PropertyCollector properties, GenerationMode generationMode)
Parameters
ConcreteSlotValueAsVariable(AbstractMaterialNode.OutputPrecision)
Declaration
protected virtual string ConcreteSlotValueAsVariable(AbstractMaterialNode.OutputPrecision precision)
Parameters
Returns
Type |
Description |
System.String |
|
ConvertConcreteSlotValueTypeToPropertyType(ConcreteSlotValueType)
Declaration
protected static PropertyType ConvertConcreteSlotValueTypeToPropertyType(ConcreteSlotValueType slotValue)
Parameters
Returns
CopyValuesFrom(MaterialSlot)
Declaration
public abstract void CopyValuesFrom(MaterialSlot foundSlot)
Parameters
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
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
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
InstantiateControl()
Declaration
public virtual VisualElement InstantiateControl()
Returns
Type |
Description |
VisualElement |
|
IsCompatibleStageWith(MaterialSlot)
Declaration
public bool IsCompatibleStageWith(MaterialSlot otherSlot)
Parameters
Returns
Type |
Description |
System.Boolean |
|
IsCompatibleWith(MaterialSlot)
Declaration
public bool IsCompatibleWith(MaterialSlot otherSlot)
Parameters
Returns
Type |
Description |
System.Boolean |
|
RawDisplayName()
Declaration
public string RawDisplayName()
Returns
Type |
Description |
System.String |
|
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.