You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

36 lines
1.1 KiB

using System;
using UnityEditor.ShaderGraph.Drawing.Slots;
using UnityEngine.UIElements;
using UnityEditor.Graphing;
using UnityEngine;
namespace UnityEditor.ShaderGraph
{
[Serializable]
class DefaultVector2MaterialSlot : Vector2MaterialSlot
{
public DefaultVector2MaterialSlot()
{ }
public DefaultVector2MaterialSlot(int slotId, string displayName, string shaderOutputName, string defaultLabel = "Default",
ShaderStageCapability stageCapability = ShaderStageCapability.All, bool hidden = false)
: base(slotId, displayName, shaderOutputName, SlotType.Input, Vector2.zero, stageCapability, hidden: hidden)
{
m_DefaultLabel = defaultLabel;
}
[SerializeField]
string m_DefaultLabel = "Default";
public string defaultLabel
{
get => m_DefaultLabel;
set => m_DefaultLabel = value;
}
public override VisualElement InstantiateControl()
{
return new LabelSlotControlView(m_DefaultLabel);
}
}
}