Throughout this past week, the Build-A-Bot team has been focused on polishing up the game that we have created so that we can publish it sometime in July and start collecting data to train our Machine Learning algorithm.
I volunteered to create a 'Help' button for the game. If users ever get confused as to what they can do and how they can do it, they have the option to click the 'Help' button which will display how each element of the game works. This assignment was a simple one to get started with, especially considering I am using Unity which uses the C# coding language, both of which I have never used.
Before diving into the assignment head first, I watch a couple of videos and courses about Unity and C# on Udemy. This content helped me get a taste of how the language worked and how I would be able to accomplish what I needed to do.
After getting the hang of the syntax of the language and the IDE (or the program of Unity), I started with creating the content that I needed to display in the game. All in all, the only thing I needed to display was the button and the text with help. Creating these elements in Unity was not that difficult, but I ran into a roadblock when it came to connecting the button to an action.
In the code of any button that you press online, the computer recognizes you pressed a specific button, in this case, let's use the example of a generic "Submit" button. Once the computer sees that a button is pressed, the computer asks the button what block of code it wants to run. The button tells the computer that it wants to run the 'submit' code, where any information inputted gets taken and sent to the servers. So the computer runs the 'submit' code and that's the end of that.
The issue I was running into was that I could not figure out why when I clicked the 'Help' button, it wouldn't display the text. It took me two days to figure it out. I had forgotten to tell the computer what code block I wanted to run when the help button was pressed.
Now that I have the prototype done, I must wait for our meeting on Tuesday to get feedback from the rest of the team. Until then, I hope you aren't afraid to ask for some help in your life.
Before Help Button GUI:
After Help Button GUI:
Video Demonstration of the Button:
Comments