This section describes how you can make changes to the touch screen interface.
For example. when you want to change the size of the touch screen buttons, or the position of the buttons.
- In the project folder: search for the “UI” prefab and drag it into the sceen.
- In the hierarchy, go to the UI gameobject, open it and open the canvas gameObject. Inside it you can see all the interfaces of this project. One of them is the “TouchScreenControls”.
- By default all the interfaces (gameobjects) are disabled. Enable the “TouchScreenControls” Gameobject in the inspector tab. In the game view of the project you should now see the buttons of the touch screen interface.
- You can now make changes to the interface. In the hierarchy, select the gameobject of the button you want to edit. for example select “ButtonPunch”. Then press the “F” button on the keyboard to bring this gameobject into focus. You can move around, scale or make other changes to this object.
There is also a UIButton component on every button. In the action dropdown you can assign or change the action of this button.
- When you are satisfied with the new layout. Press the “apply button” to save your changes to the UI prefab. Also don’t forget to remove the UI prefab from the scene before you press “Play”.