Firstborn/Library/PackageCache/com.unity.visualscripting@1.../Runtime/VisualScripting.Flow/Connections/IUnitConnection.cs
Schaken-Mods 9092858a58 updated to the latest editor
I updated everything to the latest Unity Editor. Also realized I had the wrong shaders on my hairs, those are fixed and the hairs look MUCH better!
2023-05-07 17:43:11 -05:00

25 lines
1.1 KiB
C#

namespace Unity.VisualScripting
{
/* Implementation notes:
*
* IUnitConnection cannot implement IConnection<IUnitOutputPort, IUnitInputPort> because
* the compiler will be overly strict and complain that types may unify.
* https://stackoverflow.com/questions/7664790
*
* Additionally, using contravariance for the type parameters will compile but
* fail at runtime, because Unity's Mono version does not properly support variance,
* even though it's supposed to be a CLR feature since .NET 1.1.
* https://forum.unity3d.com/threads/398665/
* https://github.com/jacobdufault/fullinspector/issues/9
*
* Therefore, the only remaining solution is to re-implement source and destination
* manually. This introduces ambiguity, as the compiler will warn, but it's fine
* if the implementations point both members to the same actual object.
*/
public interface IUnitConnection : IConnection<IUnitOutputPort, IUnitInputPort>, IGraphElementWithDebugData
{
new FlowGraph graph { get; }
}
}