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

50 行
1.1 KiB

using System;
using UnityEngine;
namespace RMGUI.GraphView
{
[Serializable]
public class EdgeData : GraphElementData, IConnection
{
[SerializeField]
private GraphElementData m_OutputData;
[SerializeField]
private GraphElementData m_InputData;
public virtual IConnector output
{
get { return (IConnector)m_OutputData; }
set
{
var ged = value as GraphElementData;
if (value != null && ged == null)
throw new ArgumentException("The value passed to EgdeData.output is not a GraphElementData");
m_OutputData = ged;
}
}
public virtual IConnector input
{
get { return (IConnector)m_InputData; }
set
{
var ged = value as GraphElementData;
if (value != null && ged == null)
throw new ArgumentException("The value passed to EgdeData.input is not a GraphElementData");
m_InputData = ged;
}
}
public Vector2 candidatePosition { get; set; }
public bool candidate { get; set; }
protected new void OnEnable()
{
base.OnEnable();
capabilities = Capabilities.Deletable | Capabilities.Selectable;
}
protected EdgeData() {}
}
}