public NodeLinkPort GetFromPort() { if (!from || fromField == null) { return(null); } return(new NodeLinkPort(from, NodeDataCache.GetLinkCacheInfo(from.GetType(), fromField))); }
public NodeLinkPort GetToPort() { if (!to || toField == null) { return(null); } return(new NodeLinkPort(to, NodeDataCache.GetLinkCacheInfo(to.GetType(), toField))); }
public void Destroy() { if (from) { NodeDataCache.GetLinkCacheInfo(from.GetType(), fromField)?.Disconnect(from, this); } if (to) { NodeDataCache.GetLinkCacheInfo(to.GetType(), toField)?.Disconnect(to, this); } DestroyImmediate(this, true); #if UNITY_EDITOR AssetDatabase.SaveAssets(); #endif }