I was using some UI components on my games, and decided to share this project publicly. You can find scripts on Github, and test UI system on demo link below.
I also recorded a video to show you, how it works, how to use it.
Please don’t hesitate to share if you have any ideas or suggestions.
This components is basically helps you to build forms on your Playcanvas script, without dealing HTML styling. You can simply drag&drop input script to an element and use it’s functionality without dealing some style properties, such as font, positioning and visibility.
There are 4 different input type that can be used in script.
- Text input
- Select input
Since I use these components in my games, there are some other functions that is useful in games. Like store value option. That function simply keeps value in text element, even after page reload. I was using that functionality on settings, or guest username.
You can simply reach the input’s value with getValue function in the script. If you use input element, you can use entity.script.input.getValue(); to get it. setValue function also can be used.
The scripts are very easy. You can write your own script in a short time. But I wrote these components once and thought it can be good to share with people. I always use them on my projects.
Anyway, here is the demo link :
Here is the project link :
Here is the github repository :
And here is the youtube video, in case you need assist :