Seneral / Node_Editor_Framework

A flexible and modular Node Editor Framework for creating node based displays and editors in Unity
https://nodeeditor.seneral.dev
MIT License
2.01k stars 414 forks source link

Multiple Connection on node input #31

Closed muit closed 8 years ago

muit commented 8 years ago

Hi! First of all, nice work, this really helps a lot! So the question/possible feature: Is it possible to create a connection type that can be connected multiple times with only one input? like: A connected to C, B connected to C

Seneral commented 8 years ago

Not yet without further modifications, but there is currently a discussion on the thread (last page). In short, I'll do this including other customization options when I'm finished with the statemachine support. You may also take a look at the other 'issue', I count them as one as they both adress customization limits of knobs. Priority to change this is high, so don't worry, in about two weeks I hope to have something done:) As a side note; Why would you wan't to do this? Besides some abstract usage, no use case comes to my mind that could benefit from this...

Seneral commented 8 years ago

Btw I could implement this really fast if you wish. Not too much to do;)

muit commented 8 years ago

Im working on a script/screenplay editor for writers. (Will also publish it with some other tools when I have it working propertly). Thats why I need a node net.

PD: Thanks for your fast answer and work.

muit commented 8 years ago

For now I will create a dynamic input creation :P

Seneral commented 8 years ago

Also a good idea. But for a writer (kind of a dialogue system I suppose?), the upcoming Statemachine behaviour would be preferrable I guess. I have it somewhat working currently, not very fleshed out, but it supports transitioning conditions and time, so I guess I can prepare you a alpha/beta whatever until next weekend. Maybe I'll even have it working fully until then;)

muit commented 8 years ago

Really? Conditions like the unity animation control? Thats cool, and also something I planned to work on. Could I help you someway?

Seneral commented 8 years ago

Yes, this would be features the base transition has. For your specific needs I'll implement a fetching system similar to the ones of Nodes and ConnectionTypes. That will enable you to create transitions dedicated to transition between animations, AI states or the screenplay elements in your case. I don't know exactly how you could help, sorry. It's a thing to share tasks between contributors and another to work on one task together... I don't know where your interests lie, but the Connections still need some sort of click detection and clipping feature (both pretty easy for lines, not so for beziers). But I appreciate your help and hope you're doing well creating you Screenplay editor:)

muit commented 8 years ago

:P Thanks for your support, I will probably improve the key control system, like move multiple nodes or create connections from outputs to inputs. if I do it i will make PR.

Seneral commented 8 years ago

Sounds great, good luck!

A hint, I used this before in another project: You can get the Editor selection rect style by using GUIStyle boxSelectionStyle = "SelectionRect" Of course only a style to use for the editor version, nor at runtime:(

muit commented 8 years ago

Cool, thanks. I will do that then.

nicloay commented 8 years ago

@Seneral Thanks for support. I faced exact the same problem. I'm working on some kind of dialogue system where I'm triggering different events on the different scene objects. and i also has some loops in logic where i need to go back to previous events after execution.

Could you give me a hint. in case if I'll fix this by myself what is a better, modify existing NodeInput.cs connection property, or derive from nodeKnob and create brand new class with implementation.

thx.

Seneral commented 8 years ago

I recently explored the option of creating multiple input connections, even implemented it, but as a cause all saves got broken... Don't know if that step makes any good... Regarding your requests, as mentioned before, you needs would be best fulfilled with the WiP state behaviour system I suppose:)

Seneral commented 8 years ago

I've this implemented as of now. But as any use case I could think of (and both of yours) can be resolved using the new state system, and the implementation breaks existing saves, I'm not sure whether to publish such an update. I probably could write a workaround to load old saves, but I'd like to avoid that if possible. Instead, you're actually able to extend the NodeKnobs way better with other changes I've made, so you can reproduce the behaviour of existing Inputs/Outputs yourself if needed (With restrictions, fE. no direct access through Inputs[] or Outputs[] but through the generic knob collection 'mess' NodeKnobs[]). What do you think, should I include this change in a new update? The state system will be coming in the same:)

vicenterusso commented 7 years ago

Hi, is this feature live in any branch?

Seneral commented 7 years ago

No not yet, been very busy recently:/

molocai commented 7 years ago

Hello, I'm really interested in this as well, do you have any idea of when it could be live? Or how someone would go about implementing this? Thanks :)

Seneral commented 7 years ago

We have a detailed discussion on this and already an implementation by @JoshAshby but I haven't heard anything about it since:/ I'm currently relatively busy but I expect to get some free time next month:)