00:00 Introduction
00:20 Showing Final Game
01:10 Installing Unity Hub
02:15 Installing Unity, Android SDK, NDk
04:00 Creating New Project
05:26 Changing Build Target to Android
08:00 Creating Boundaries
11:38 Adding Balls
23:05 Creating GameManager
29:20 Add Wining Message
33:50 Creating Restart Button
39:37 Building an apk
44:29 Building and running apk on mobile device
- Changing Build Target to Android
File>Build Settings
Android : Switch Platform
- Layout : 2x3
- Game > Aspect
- 16:9 Portrait
- Assets>Scenes
SampleScenes -> Game (rename)
- Camera > MainCamera
Clear Flags > Solid Color
Background : change color
- Assets
Create>Folder : Sprites
Create>2D>Sprites>Squares (rename Boundary)
만든 Boundary를 Hierarchy로 드래그 앤 드랍
Add Component : Physics 2D>Box Collider 2D
Sprite Renderer : Change Color
Move and Duplicate
- Ball
copy ball.png from web site
ball.png background transparency by using gimp
Add Component :
Physics 2D>Circle Collider 2D
Physics 2D>Rigidbody 2D
Create>2D>Physics Materal 2D
Rename Bounce
Set Friction 0, Bounciness 1
Circle Collider Material과 Bounce를 연결해줌 (드래그앤드랍)
Transform (사이즈 변경)
- Create C# Scripts
Scripts 폴더 생성
Ball 이름 변경
```
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Ball : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}
```
Hierarchy에서 Ball을 선택한후 ball script를 드래그앤 드랍하면 추가됨
References
How to make a transparent background/selection on an image using GIMP
- Open your image.
- Select the area you want to make transparent. ...
- In the Layer window (the one showing your image), select Layer – Transparency – Add Alpha Channel.If this is blanked out then it's already done. ...
- Select Edit – Clear. ...
- Save the file.
Gimp: Remove The Background And Make It Transparent
'tech > game' 카테고리의 다른 글
21/08/09 Unity Tutorial Youtube 모음 (0) | 2021.08.09 |
---|---|
21/08/09 Beginning C# with Unity (0) | 2021.08.09 |
21/08/08 유니티 20분만에 증강현실 AR 앱 만들기 (Unity + Vuforia AR app) - 쉽게 앱 만드는 방법 (현직 개발자 설명) (0) | 2021.08.08 |
21/08/08 How to EASILY Build to an Android Phone in Unity (0) | 2021.08.08 |
21/08/08 How to Make a Game - Unity Beginner Tutorial (0) | 2021.08.08 |