Drop 9 of Visual Scripting for DOTS is ready for you to try!
Hi everyone, this time around we focused on events and tracing, which we hope you will find useful.
You will find the drop 9 project .zip in here
And a demo project here
The demo project includes everything from drop 9 so you do not need to install both.
It will provide a few examples with documentation to help you start if it’s your first time.
Just look for the 00_Example scene:
We recommend using 2019.3.8f1 since 2019.3.11f1 has some performance issues on larger graphs (>30 nodes).
What’s new?
Send and receive events to/from the code from/to visual scripts using On Event/Send Event nodes.
You can now choose which scripts are traced.
Portals
Data Node: This
Data Node Select
Expression Node
Basic node documentation in searcher
Known issues / Limitations
Tracing on portals isn’t supported
Events only accepts string128
Jobs that dispatch or receive events are not Burst compilable yet
You must call Complete() on the jobHandles that dispatch or receive even
Editor is slow when many nodes are present in the graph. This will be fixed in 2019.3.13f1. Reverting to 2019.3.8f1 is also possible.
Disclaimers
As with the previous experimental drops, this is work in progress that we share to engage in an open discussion with our community. Expect issues and weird workflows as we work our way up to a more final product.
So kindly take note of the usual disclaimers:
Not for production use.
Early picture of Visual Scripting, not be representative of the final version.
Things will change.
Feedback
We are very grateful for your feedback. Even if we do not have the time to answer and debate every point, rest assured we read every comment.
Kindly keep the exchanges polite and constructive. The forum is a space for us to learn and discuss.
Portals probably should have a way to be titled. Seems kind of confusing that every one would be named “Data Portal” and the only way to know which start and end point belong to each other is by hovering them. I like the typical way this is done, where you give a start portal a title, and then when you add an end point, you get a nice drop down with all the start portal titles to pick from and link too.
That and/or allow the start portal node color to be linked to the end portal node color
The current implementation is focused on correctness - once the runtime has the right behaviour, we’ll start implementing a performant runtime. That way we can iterate fast now and have unit tests comparing the two backends.
Meaning, we’ve been actively avoiding optimization until now. We’ll start working on low hanging fruits ( like these spikes) for the next drop
The Input axis node will only be accessible in the demo project. this is a custom node to give some support for inputs until we make the real thing. I also added 2 nodes in the project to show how to make your own nodes. Warning, TechArt code :P.
Anyway to get enums to show up in the nodes? Or do you have to make separate nodes similar to your getaxis node?
I would like my ‘space’ variable to show up here:
[Serializable]
[WorkInProgress]
[NodeDescription("Translate an Entity based on input and multiplier.")]
public struct Translate : IFlowNode
{
[PortDescription("")]
public InputTriggerPort Input;
[PortDescription("")]
public OutputTriggerPort Output;
[PortDescription(ValueType.Entity, Description = "The GameObject that will change its position.")]
public InputDataPort GameObject;
[PortDescription(ValueType.Float3, Description = "Translation direction")]
public InputDataPort Direction;
[PortDescription(ValueType.Float, Description = "Speed of the translation")]
public InputDataPort Multiplier;
public enum Space { Self, World }
public Space space;
public void Execute<TCtx>(TCtx ctx, InputTriggerPort port)where TCtx : IGraphInstance
{
var entity = ctx.ReadEntity(GameObject);
if (entity != Entity.Null)
{
var t = ctx.EntityManager.GetComponentData<Translation>(entity);
var r = ctx.EntityManager.GetComponentData<Rotation>(entity);
var translation = math.normalizesafe(ctx.ReadFloat3(Direction)) * ctx.ReadFloat(Multiplier) * ctx.Time.DeltaTime;
if (space == Space.Self)
translation = math.mul(r.Value, translation);
t.Value += translation;
ctx.EntityManager.SetComponentData(entity, t);
}
ctx.Trigger(Output);
}
}
edit: I guess I can understand if you have a huge monolithic node to have the execution types off to the side like that…but is there a way to put it right on the node if you want to?