Example #1
0
        public static string GenerateNewNodeCommand(Type nodeType, string name, Vector2 position, BaseGraphCLIAttributes datas = null)
        {
            string cmd = "NewNode " + nodeType.Name + " \"" + name + "\" (" + (int)position.x + ", " + (int)position.y + ")";

            if (datas != null && datas.Count != 0)
            {
                cmd += " attr=" + Jsonizer.Generate(datas);
            }

            return(cmd);
        }