imagicbell / ublockly

reimplementation of google blockly for Unity
http://imagicbell.github.io/unity/2017/10/11/blockly-one.html
Apache License 2.0
138 stars 52 forks source link

How to use only Interpreter? #32

Closed shlifedev closed 3 years ago

shlifedev commented 3 years ago

First thanks, this project is very great! But I want use interpreter only..
(I want to use the xml I created from my blockly web site.)

Can you make a simple example or tips?

imagicbell commented 3 years ago

There are APIs for parsing xml in Xml.cs

TextToDom(string text) {}
DomToWorkspace(XmlNode xml, Workspace workspace) {}

You can also follow this code to load XML, in XmlView.cs

LoadXml(string fileName) {}

There might be some incompatible errors because my XML structure might not be 100% the same as google blockly.

shlifedev commented 3 years ago

Thanks! (❁´◡`❁)❤