public virtual void FixOneWayLinks() { if (WrappedInstance == null) { Debug.LogError("Somehow we are running this check on objects that don't exist?"); return; } foreach (EntityLink <EntityType> CurrentConnector in WrappedInstance.InputEvents) { foreach (EntityLink <EntityType> RemoteConnector in CurrentConnector.LinkedEntities) { bool bFound = false; foreach (EntityLink <EntityType> RemoteRemoteConnector in RemoteConnector.LinkedEntities) { if (RemoteRemoteConnector.GetOwner() == CurrentConnector.GetOwner() && RemoteRemoteConnector.Name == CurrentConnector.Name) { bFound = true; break; } } if (!bFound) { bErrorInNode = true; } } } foreach (EntityLink <EntityType> CurrentConnector in WrappedInstance.OutputEvents) { foreach (EntityLink <EntityType> RemoteConnector in CurrentConnector.LinkedEntities) { bool bFound = false; foreach (EntityLink <EntityType> RemoteRemoteConnector in RemoteConnector.LinkedEntities) { if (RemoteRemoteConnector.GetOwner() == CurrentConnector.GetOwner() && RemoteRemoteConnector.Name == CurrentConnector.Name) { bFound = true; break; } } if (!bFound) { bErrorInNode = true; } } } }
public override void FixOneWayLinks() { List <EntityLink <EntityType> > Events = null; if (bIsInputBox) { Events = GetStartEntities(); } else { Events = GetEndEntities(); } if (Events != null) { foreach (EntityLink <EntityType> CurrentConnector in Events) { foreach (EntityLink <EntityType> RemoteConnector in CurrentConnector.LinkedEntities) { bool bFound = false; foreach (EntityLink <EntityType> RemoteRemoteConnector in RemoteConnector.LinkedEntities) { if (RemoteRemoteConnector.GetOwner() == CurrentConnector.GetOwner() && RemoteRemoteConnector.Name == CurrentConnector.Name) { bFound = true; break; } } if (!bFound) { bErrorInNode = true; } } } } }