-4

Regarding a typical "node editor" ...

enter image description here

I want to build a similar system in Unity3D.

Where would I start with something like that?

Fattie
  • 27,874
  • 70
  • 431
  • 719
Chud37
  • 4,907
  • 13
  • 64
  • 116
  • "How would I go about just having nodes joined"...Can you please focus your question? What do you want to do? Do you want to write your own node editor? I see you've tagged C# and unity3d. Are you actually developing for unity or do you want to create a C# app with a similar interface? – Wyck Mar 12 '20 at 13:33
  • @Wyck sorry - I've updated the question to be a bit more specific. Yes I'll be using C# and Unity3D - But I can't figure out how to get started. I'm new to Unity but not to programming so I just need a hint as to the right direction I should be taking. – Chud37 Mar 12 '20 at 13:53
  • @Wyck , something to consider, by its nature questions about game engines can be incredibly, amazingly, broad! Unity questions cange from "c# syntax" to "in app purchasing crypto hash question" to "shaders" to "pathfinding" to "networking" to more .. you know. Many unity questions are, at heart, "where the hell do you start with this issue?" Consider this Q by a sophisticated (and handsome!) SO user, stackoverflow.com/questions/25078224 , really, I'm just asking "where the heck do you start with this?" It's a ridiculously broad-ranging issue. Anyway just a thought, cheers! – Fattie Mar 20 '20 at 14:39

1 Answers1

3

Lesson one in Unity is the asset store:

Devs new to Unity don't realize that using the asset store is a basic in Unity development.

Say you

  • started writing a relational database from scratch, instead of using MySql

  • started writing a text rendered from scratch in Swift instead of just using the text drawing available in iOS

  • decided to write your own markup language rather than using CSS

All of those things would be ... insane!

Similarly it's completely ridiculous, in Unity, not to start with existing Assets.

Many full 'node editors' are freely available on the asset store. It would be basically insane to start from scratch! If you seek example code from which to begin learning, you're there.

Take one of the available ones, and begin from there.


Chud, as you know this is probably too general for here

  1. get in to Unity "2D" so you can move sprites around, the boxes would just be sprites basically

  2. Big Problem - Unity is utterly hopeless at drawing lines. It's just not made for it. So you will really struggle drawing the yellow lines (or any lines!) Your best bet is to just start with asset store line drawing stuff (which is all crap, but at least you'll have something)

(You really need to work at the shader level if you truly need lines in Unity, it's just not made for it)

  1. Regarding dragging/etc, in general terms start with my QAs here:

https://stackoverflow.com/a/37473953/294884

Horrors of OnPointerDown versus OnBeginDrag in Unity3D

halfer
  • 19,824
  • 17
  • 99
  • 186
Fattie
  • 27,874
  • 70
  • 431
  • 719
  • Thank you, I know it was general, But I wasnt sure how to get started. Why can't I draw Lines in Unity? It seems like a powerful game engine should at least be able to handle that. Also - I have just found this: https://gram.gs/gramlog/creating-node-based-editor-unity/ Is it all possible to modify that code to use in the Game Window (Canvas or something) instead of the editor? – Chud37 Mar 12 '20 at 14:12
  • hi @Chud37 (1) I can't really answer "why" questions; Unity is (obviously) entirely dedicated to the rendering pipeline of mesh, textures, and the GPU. All of that is totally unrelated to drawing lines in the video plane. (You may as well ask "Why is it so hard to draw a simple 3D car in Swift?") – Fattie Mar 12 '20 at 16:48
  • hi @Chud37 , the article you linked is useless, it uses "OnGui" which is completely deprecated. You have to use the "new" Unity gui system. There is utterly no reason you would bother even reading such a crap article, when there are numerous "node editor starter kits" sitting on the asset store. – Fattie Mar 12 '20 at 16:50
  • overwhelmingly, @Chud37 , just start on the asset store - enjoy! – Fattie Mar 12 '20 at 16:54