官术网_书友最值得收藏!

Finishing the game

If you didn't want to go through the process of building the application and putting it on your device, it is still possible for you to try out interacting with the buttons, and touching them with your fingers. In Chapter 1, Saying Hello to Unity and Android, we installed the application, Unity Remote. Plug the device into your computer and start it up; when you click on Play in the Unity Editor, you should see the game running on your device. If you can see the game playing in the Unity Editor but not on the device, just restart Unity. Make sure to save it; it would be awful to lose all of your hard work.

Undoubtedly the first thing you will notice when using Unity Remote is that the game doesn't look good. It is almost certainly stretched and pixelated. If it doesn't concern you now, don't worry, it gets worse when the project becomes more complicated. Now, before you start freaking out, grumbling about why you had to install such a useless program, you must understand the point of Unity Remote. We went over it sometime back, but we will dig a little deeper. Unity Remote is for testing device inputs: touch screen, tilt, and so on. What it looks like is a result of freeing up bandwidth so that the frame rate is the same as it is in the Unity Editor.

There is something you can and should do about the stretching. At the top-left corner of the Game window of the Unity Editor is a drop-down list. By default it is set to Free Aspect, which means the window will fill all the space available. If you click on it, a variety of aspect ratio options will be presented. Clicking through these options, you will see black bars in the Game window. This is Unity resizing the Game window and blacking out the unused space. The options change based on what the build target is. In the Build Settings window, change your platform to Android. In the Game window's drop-down menu, find an aspect ratio that matches your device. With that selected, your game will no longer appear stretched when using Unity Remote.

主站蜘蛛池模板: 隆化县| 马山县| 中江县| 台山市| 永和县| 山东省| 文水县| 芜湖县| 苍梧县| 开平市| 垦利县| 太湖县| 错那县| 蒙城县| 平山县| 涡阳县| 宁陕县| 博罗县| 温州市| 阿城市| 彭水| 平邑县| 探索| 铁岭县| 满城县| 兴城市| 壤塘县| 尚义县| 临朐县| 黄石市| 山西省| 建始县| 札达县| 剑川县| 深圳市| 沈丘县| 太仆寺旗| 柳江县| 宝应县| 虎林市| 靖边县|