Files
Bombaleila/Library/PackageCache/com.unity.shadergraph@c8830f61858d/Editor/Data/Graphs/DefaultVector2MaterialSlot.cs
2026-03-03 00:39:30 +05:00

37 lines
1.1 KiB
C#

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);
}
}
}