BGP Week 7 – UI basics

As Gotland Game Conference got closer, we realized we needed at least a simple UI, and as such I took on the work to put that in. While the work was not that overwhelming, I was new to working with the Canvas layer of Unity, and as such had to learn as I worked.

The first step was quite easy, add some images into the screen. This was simply implanted using the Raw Image template, which for someone inexperienced seemed the easiest way. With this I placed in icons for the collectibles and two button icons placed in the bottom corners, for future use.

Next was to implement score into the mix. This was done by adding two text objects on the canvas and then modifying score counter, the receiving script made earlier to hold the values for score. By adding new parts two public Text objects to take in the ones added to the canvas, the score was rebuilt to print out the current number of collected pieces. This was also when the chance for it to calculate the total was made, so that it also could display the total amount the player had to collect next to the collected amount.

With this, the most essential information was being displayed. However, there was one more UI feature we wanted, which will be the focus of the next post.

About Stefan Ekdahl

2014  Programming