You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public class TestScriptMachineRuntime : MonoBehaviour
{
// Start is called before the first frame update
void Start(){
FlowGraph graph = new FlowGraph();
graph.title = "Ttile1";
graph.summary = "Summary";
MachineEventUnit<EmptyEventArgs> u1 = new Start() { position = new Vector2(-204, -144) };
MachineEventUnit<EmptyEventArgs> u2 = new Update() { position = new Vector2(-204, 60) };
Literal u3 = new Literal( Type.GetType("System.String"), "test string"){position = new Vector2(-204, 60)};
// Format: "targetType;name;paramType1;paramType2"
// Example: "UnityEngine.Transform;rotate;UnityEngine.Vector3"
Member member = Codebase.DeserializeMember("UnityEngine.Debug;Log;System.Object");
InvokeMember u4 = new InvokeMember(member);
graph.units.Add(u1);
graph.units.Add(u2);
graph.units.Add(u3);
graph.units.Add(u4);
}
//I spent 8 + hours for investigation solution and 5+ hours for writing code, because Unity manual is not contains examples
// how to work with visualScripting FlowGraph via C# script. And I did not tested it in build because I still didnot create edge for nodes as you can see in code above.
At current moment I am not so confident about code of NGP and how it can be possible https://docs.unity3d.com/Packages/[email protected] has inbuild graphprocessor execution model
editor visualization for nodes
and only one things to do is writing conection for graphView runtime.
What I need is Runtime implementation of NGP:
UiDocument VisualElement GraphView working runtime
There si no good documentation for using visualScripting nodes and graph via scripts.
https://docs.unity3d.com/Packages/[email protected]/manual/vs-create-custom-node-add-docs.html
Here is Example but not full for manipulation graph model runtime
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Unity.VisualScripting;
public class TestScriptMachineRuntime : MonoBehaviour
{
}
I found out that 1.8 contains realy immersive changes suitable for best solution
https://docs.unity3d.com/Packages/[email protected]/manual/bolt-interpreter.html?q=Debug
that project is realy new. But It gave me the possibility to draw graph
https://github.com/Sahasrara/GraphViewPlayer
At current moment I am not so confident about code of NGP and how it can be possible
https://docs.unity3d.com/Packages/[email protected] has inbuild graphprocessor execution model
editor visualization for nodes
and only one things to do is writing conection for graphView runtime.
What I need is Runtime implementation of NGP:
My implementation is raw prototype that can do nothing.
You can try collaborate with that Man [email protected] Developer of https://github.com/Sahasrara/GraphViewPlayer
The text was updated successfully, but these errors were encountered: