示例#1
0
    IEnumerable <Type> GetConnectableTypes()
    {
        var connectableTypes = new HashSet <Type>();

        connectableTypes.UnionWith(nodeViews.Values.SelectMany(x => x.ConnectionTypes));
        connectableTypes.UnionWith(GetSerializedScriptableObjectFields().Select(x => x.FieldType));
        var derivedTypes = new HashSet <Type>();

        derivedTypes.UnionWith(connectableTypes.SelectMany(x => NodeEditorUtilities.GetDerivedTypes(x, false, false)));
        connectableTypes.UnionWith(derivedTypes);
        return(connectableTypes);
    }