diamond Visual Scripting

maybe the vec3/put this float in … could be simplified to a single entry on the list and have a bool on the 3 components (xyz) on the node to show where you want the value to be put, rather than having separate functions on the list for every combination. maybe the same can be done with vec2 and vec4?

being able to zoom in and and out of the whole view would be useful. its used in many other visual scripting products and people are used to it, also it would allow nodes to be separated more. this was just a quick test at colour coding the nodes (i didn’t do all the lines as you can see) an idea i had for the nodes was to have the colours of the input and output nodes bleed over the colours of the node property type, so the user can see how the colours must match. this would help when zoomed out to help see how data flows. Maybe an auto number function can be implemented to number the nodes from left to right, then this can be fine tuned by the user. also copy and paste. the separate project variables node would be useful here. maybe a mini node that attaches directly to the side of the nodes to save space. Is there a way to have an exposed variable available in all graphs. like an exposed project variable. or maybe in just the one graph. an exposed get variable?

Hi Barada,

Could you please tell me in which type of node you need this, or in which context, so I can figure out more your need and maybe there is a solution already.

You can zoom out/in all nodes by holding alt + mouse wheel.

Your idea of blending node color according to input and output is genius, I will test it, technically it can be done by generating the node texture in Diamond runtime (may affect performance), or load a library of textures already authored (more performance friendly), anyway I will work on this idea because is very useful for graph readability.

I am also working on transfer data between graphs, states, and logics. The exposed variables question can be solved here, once I finish the transfer data system, I will send you a package to have your feedback.

I robust transfer data system may also be more flexible than project variables system.

1 Like

I am enhancing it to zoom in/out centered to the mouse position

1 Like

my plan is to make a prefab tile (cube) and put a diamond script on it that checks to see if it has moved out of the map area (just checks the x and z from the position) if it is it moves itself to the other side of the map. in order to do this the script must know which instance of the object it is attached to.
so its one of these, but but “get self” or “get the object i am a component of”

Great. AS far as the colour blending across the nodes idea. i had thought maybe if you constructed the ui box with a vertex at the input,output positions then the vertex could have its vertex colour edited appropriately and with the use of a vertex colour shader the points would blend correctly. i can illustrate if that helps

1 Like

I think you need is to let this game object be known by another script

the node is drawn by the unity EditorGUI class, I didn’t search around yet to know if this class can handle meshs and shaders directly, but another solution could be simpler, this class draw quickly rectangles with images inside, so I can tell it to draw an image on a rectangle near to the input with the input color and a transparency gradient to fake a blending effect with the rest of the node.

You need this game object to be known by another graph or script, don’t you?

no. just able to find what game object it is on at runtime. it will be on every tile. so there will be 100 instances of it and it needs to be able to find its own instance game object.

sorry very rough, but can be coded rather than using lots of textures or ram.

it hasnt come out too well, but i hope you can see how the vertex colour blends. i should have left the water mark off

Ah I understand better now, like the get game object node, you need a node which the output game object is the “the one attached to”

yes thats it :slight_smile:

Yeah I see the idea, it is applicable if the Unity gui class draw meshs, i think it can do, but it means reconstruct the mesh at every node option changes because the input output position arn’t the same at each node option , this mean integration a triangulation algorithm to diamond, It may be a good idea, but we have to choose an optimal solution between charging the ram, the cpu, or the gpu.

Test this,

3181380--242653--GetBySetNameTheAttachedToObect.png

the node 0 has output string (the game object name), the node 1 has the game object itself as output.

All diamond nodes that have a function of type Set …somthing (in this case “set name”) , has as output the object itself.

It is not the ideal solution but it can work now.

while waiting for a node specialazed in sending the on attached to gameobject

i think theres also a way to add vertices to the canvas mesh.

its probably far too involved for this. i think there are far simpler ways to highlight the variable types by colour, at least for early development. But thank you so much for the consideration. :slight_smile:

1 Like

Ahhhh, i forgot about choosing it there. totally my fault. maybe if those options on the input object are shown as a drop down list it would be obvious to dumb user like me that they can be changed :roll_eyes:

1 Like

Thanks for suggestions, this way a software evolve,

many technics can achive the same result, I will took a look at canvas renderer, but as long as it is a class in the UnityEngine namspace not in the unityeditor namespace it may not work in editor plugins, at least if their is an equivament for the editor

1 Like

Not totally your fault, I have to add this to my Documentation or somewhere in Diamond editor to tell the user that when you set something, the output is the object itself. there is also a dumb developers :wink:

1 Like

I`m trying to test my map repositioning logic. some debugging tools here would be very useful. i am trying to just change the material assigned to an object and i cant seem to find a way to do it. another way is setting the material colour by object rather than by material.