Technique for in game visual scripting?

I was hoping for some suggestions on how to implement something that I am working on. I am trying to achieve something that is very similar to what uScript or PlayMaker is, but not within the editor, but in a stand alone Unity game. It has much simpler requirements than something like uScript/PlayMaker, but the functionality is the same:

Draggable objects that resemble “code”.
Connectable to make links.
Some way to hold what they represent.

I have the concept working on generating the content I want, as far as the “code”, but I am struggling with what my options are for the GUI part of this. uScript is very similar to what I wanted, with draggable windows that have a “node” that can be clicked and then linked to other nodes on other windows.

I dont know what my options are for making something like that in the GUI. Does anyone have some suggestions?

The GUI.Window wont work because its not extendable enough to add a “node” for connecting other windows, atleast not that I can see. Thanks for any help or suggestions.

To Clarify my questions:

Do I I need to make my own textures, using GUI.DrawTexture, and manually make my own events for clicking/dragging, etc?
Can I make each thing a monobehaviour and use those methods somehow?

I dont want to have to reinvent the wheel if there are unity technologies and methodologies that I can use. Thanks.

The first question is,

the GUI in question that you will be building. Is it 2D or 3D?

(it shouldn’t matter, there should be an abstraction layer inbetween, but you have to decide on the front end)

If 2D, and I assume it is, for me it would be impossible to tackle the job without 2DToolkit (asset store), which is more or less essentially for anything with any 2D anything, and is used very widely.

For the specific problem of type lfoating on the screen in unity (whether “in a game” in 2D, or as a UI), for us the only workable solution is glyphDesigner + 2DTK … note long post on the matter http://answers.unity3d.com/questions/384623/setting-font-size-according-to-screen-dpi.html?sort=oldest

there’s just no other way you can (a) see what you’re doing (b) have any font, style etc (c) never, ever, EVER ----------- E V E R ---------- worry about screen size.

we literally had to build a “thing like playmaker” for a client last yr, and this is exactly what we used.

(regarding unity’s built-in GUI system … just pretend it doesn’t exist :slight_smile: )

You mention making your own sprites, constricting them on the fly for whatever reason. If you need to do that, you’d do that with all the usual techniques like SetPixel, rendertexture, etc. And that’s great. You still have to decide how to use them (ie “show them on cubes” “use 2DToolkit” or whatever) If you use TK it nowadays completely allows building sprite sheets at runtime, which is critically important.

Hope it helps!

I don’t really know if thus is what you wanted to know: were you asking “So I’m building a big system with lots of 2D material {it’s actually a playmaker-like GUI}, how do I best handle all those floaty buttons, labels etc”. If so, for me that’s the answer.

Regarding questions like this, “Connectable to make links.” for glowing lines consider Vectrosity which is very widely used. Also grab the little asset “Dynamic Circles” from the asset store which is awesome and only a couple bucks - it has priceless example code.