I tested the editor. It works well so far. I have two questions for the moment (maybe it’s not implemented yet.)
When you save, it generates a Json file. But how do you use that in a personal project afterwards? Do we have to rewrite all the GUI code using the data from the Json file?
I would like for example that we export the code in an XML file (there is an Xml Loader extension: XML Loader | Babylon.js Documentation
Also, for example, we create a button or a GUI text field, but it does not handle any actions afterwards? (I’m talking about onPointerClickObservable, onTextChangedObservable … All observables.)
Are there any plans for this?
I imagined for example that we could in the editor select the type of observable and be able for example to inform a ‘file.js’ which executes the code to manage the interaction on a button. I know this is a part that deserves reflection and which should not be simple. A graphical interface, although it can be easily drawn, must be able to manage user interactions.
Otherwise the editor is interesting, I quickly understood how to use it.
Looks like you found the editor! Really exciting to hear you are enjoying using it. Currently we’re wrapping up putting the finishing touches on it to make sure it’s at the highest quality for a public Alpha.
In the meantime though let me help you with these couple of things a few of which will be in our documentation we are working on.
If you are saving your GUI as a local json you can host it on a site and then reference the URL for use in your project like so:
let loadedGUI = await advancedTexture.parseFromURLAsync(<url here>);
For the interactions you are looking for, for example onPointerClickObservable, you can reference a control from your texture using adt.getControlByName() and then add whatever code you would like. Doing this in step in the editor is something we are exploring and hoping to build towards.
P.S Also planning on making a mega thread once we release the public alpha so we can keep all the feedback and question together. Please look forward to it but in the meantime also feel free to ask more questions if you have regardless!
Yes indeed I have found the editor. I figured out how to test it without really knowing if it was officially announced. I did not find any documentation and with your explanation it seems very good to me.
This is what I understood :
let loadedGUI = await advancedTexture.parseFromURLAsync('<url here>');
let myButton = advancedTexture.getControlByName("mybuttonName");
myButton.onPointerClickObservable(....);
I will wait for the documentation to find out a bit more. I understand that you want to go step by step with the editor. This is a good thing.