예제 #1
0
 public NodeLinkPort GetFromPort()
 {
     if (!from || fromField == null)
     {
         return(null);
     }
     return(new NodeLinkPort(from, NodeDataCache.GetLinkCacheInfo(from.GetType(), fromField)));
 }
예제 #2
0
 public NodeLinkPort GetToPort()
 {
     if (!to || toField == null)
     {
         return(null);
     }
     return(new NodeLinkPort(to, NodeDataCache.GetLinkCacheInfo(to.GetType(), toField)));
 }
예제 #3
0
        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
        }