您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

29 行
739 B

using System.Linq;
using UnityEngine.Graphing;
namespace UnityEngine.MaterialGraph
{
public class SubGraphOutputNode : AbstractSubGraphIONode
{
public SubGraphOutputNode()
{
name = "SubGraphOutputs";
}
public override int AddSlot()
{
var index = GetInputSlots<ISlot>().Count() + 1;
AddSlot(new MaterialSlot(index, "Output " + index, "Output" + index, SlotType.Input, SlotValueType.Vector4, Vector4.zero));
return index;
}
public override void RemoveSlot()
{
var index = GetInputSlots<ISlot>().Count();
if (index == 0)
return;
RemoveSlot(index);
}
}
}