A game about forced loneliness, made by TACStudios
1namespace Unity.VisualScripting 2{ 3 /* Implementation notes: 4 * 5 * IUnitConnection cannot implement IConnection<IUnitOutputPort, IUnitInputPort> because 6 * the compiler will be overly strict and complain that types may unify. 7 * https://stackoverflow.com/questions/7664790 8 * 9 * Additionally, using contravariance for the type parameters will compile but 10 * fail at runtime, because Unity's Mono version does not properly support variance, 11 * even though it's supposed to be a CLR feature since .NET 1.1. 12 * https://forum.unity3d.com/threads/398665/ 13 * https://github.com/jacobdufault/fullinspector/issues/9 14 * 15 * Therefore, the only remaining solution is to re-implement source and destination 16 * manually. This introduces ambiguity, as the compiler will warn, but it's fine 17 * if the implementations point both members to the same actual object. 18 */ 19 20 public interface IUnitConnection : IConnection<IUnitOutputPort, IUnitInputPort>, IGraphElementWithDebugData 21 { 22 new FlowGraph graph { get; } 23 } 24}