BabylonJS / BabylonToolkit

Home of the community maintained Unity & Unreal exporters for Babylon.js
173 stars 46 forks source link

Unity Exporter - Creating UI (Panel /Button / Text/ image) #63

Closed Stocksdeepak closed 1 year ago

Stocksdeepak commented 1 year ago

Hi, I am using Babylon Editor Toolkit_5.0.0_A63 and want to create ui in my project but i can't find anything else please help me and share some references or share sample.

Thanks.

MackeyK24 commented 1 year ago

The core functionality is in the babylon.manager.js ... Everything else is handled thru script components... even the stuff i do are just script components... A place to attach your script to game object and run with a unity like life cycle. So you would just create a script component and write all your code for UI there. You would have to check out the Babylon Playground examples of how to use Advanced Dynamic Texture. That is what i do... then i make re-usable (as much as possible) script components... For instance i have created a User Interface Manager script component that really loads UI from the Babylon GUI Editor as json... The get references to the UI elements... set runtime properties and / or attach to the UI element events