McManning / McManning/BlueGraph

Add array port views

Open
#24 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C#
Stars
256
Forks
36
PR merge metrics
No merged PRs in 30d

Description

I'd like to be able to define a port type as a collection container...

class MyNode: ... {
   [Input] public SomeCollection<float> foo;
}

... and connect edges into individual slots for that collection, essentially to control the order of inputs.

This wouldn't remove the need for the Port.capacity == Multiple feature - since I'd still need singular output ports feed to multiple inputs, or single inputs come from multiple outputs without regard for order (e.g. execution flow). But this would improve usability for handling arrays of things.

The associated PortView should expand to include multiple ports, one per connected element.

I'd rather make this a custom collection type to continue supporting a single edge from an output List<T> to input List<T> and to add IConvertible support for feeding it into a T[] or other enumerable.

The other alternative - if this isn't a core feature - is to just have a custom node that accepts a dynamic list of T inputs and a single T[] output that compiles them into an array. Will probably add this as an example anyway, but it'd be nice to exist as a core feature.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the existing Port.capacity behavior and the PortView representation described in the issue. Compare the proposed custom collection type with the dynamic-list custom node alternative, then define how connected elements, ordering, and conversion to arrays or other enumerables should behave before implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, unity
Domain
game-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.