In this progress report, this will cover a scripting topic that is something that I can cover in a more detailed manner because I know it a little more than some of the more advanced ones. While this is a very simple means of interaction and it doesn’t really mean much in the long run, it is simple enough that I, an amateur, can understand it. So this time around, I will cover a special step involving the development of User Interface and how to create a base for either an UI or a layout for a main menu. This topic will be covered on the steps on making a simple layout for buttons and interactions with them.
This is a separate progress report because this is something of a special progress report and it would be something that I would like to cover on a separate post.
So here goes,
Layout – Framework
- This is a little bit elementary, but layout would help you to build the foundation for a better overall structure. Start from the bottom and work things out to the top from there. Everything needs a layout.
- Though its not always a necessity, its important to get a good idea of what your layout will look like. This layout is only for drafting and is just an example, so don’t take my word for it on the overall structure.
- This is the first idea of what it would look like for the overall design, a concept, if you will. Don’t finalize this. You may want to make it a little more coherent with the style you wish to work off of.
This is the final version of the backdrop:
As per the course, to develop something requires you to have the switches and the necessary functions to work off of. So the basic idea is to layout what you want to put into the game and what the scope of the idea for the game will be in terms of its structure and flow.
To add it off, you need basic scripting functions in terms of interaction and changing between scenes. In this case, you require two functions: Application and OnClick public void function.
public void OnClick_Play() -> A function which allows you to create an interactive function on the script allowing you to put a function when clicked upon. After which, you apply Application.LoadLevel(“String”);
- Replace string with your scene and you should be able to apply the load level into the function. Then apply the script into the canvas hierarchy on unity. Tag the canvas into the button scene by pressing add:
Apply the steps as follows and it will provide the following effect.
Your final result will be as follows, but this depends on your script:
Public void OnClick_Enter()
Application.Quit(); -> this allows you to quit the scene in the game.
This function is packaged on the simplest way and which it would allow you to change scenes however you like. There are other means of doing this, but this is how I do it. Effectively update as necessary.
Functionalize your UI.
- The most important thing before you start tweaking stats, apply UnityEngine.UI at the beginning. This is placed above the UnityEngine basics and apply the engine onto the overall schematics of the design.
- Utilize functions such as Text to apply your functions and then on either start, apply a string function to your text to apply it in the game.
- Apply text and update the UI accordingly based on the functions and effects you made in game. This is advanced and more open-ended, but the gist of it is that functionality of UI can help you to track your states and keep an idea of what you intended to work on in terms of how the UI states work.
- You can add effects, sound, graphics and the like to pretty them up. This may help make the UI pretty, but not a mandatory solution. This is an open-ended solution which, depending on your imagination, you would be able to create it to whatever limitations you need. In the industry, a simple format of style but with pretty looking graphics is a great hook for people to get invested in functions. Though a very simple function with working capabilities would be first priority.
[Conclusion: An Analytical Reflection]
Creating something is always a challenge, but the idea of creating something and give away the information’s basic knowledge is a lot more harder to swallow than most. But the development of this progress report is a short idea on the knowledge basics on how to work things out. Though this is only limited to a certain degree. You can only learn so much by reading. I encourage you to experience it for yourself. As they say, “seeing is believing”.