강의

멘토링

로드맵

Inflearn brand logo image
Game Dev

/

Game Programming

Unity Asynchronous Programming That I Use Over and Over Again

This is a beginner-level course on Unity development that teaches students who know a little bit about Unity how to easily develop asynchronous programming using Unity's coroutine and UniTask.

(5.0) 6 reviews

102 learners

  • ominseok
유니티
게임개발
Unity
C#

What you will learn!

  • Asynchronous programming using coroutines

  • Asynchronous programming method using UniTask

  • The concept and basic usage of Tween and DOTween

Asynchronous programming in Unity that can be used over and over again?

This is a development course that teaches asynchronous programming methods using coroutines and UniTask in Unity.

First, we will start with the concept and usage of Unity coroutines, and then we will learn how to make delayed calls, execute sequentially, execute repeatedly, switch scenes asynchronously, and download images or files. We will also help you use Unity coroutines by creating a simple rock-paper-scissors game.

Next, we will explain the concept and installation method of Unitask, and help you learn how to use Unitask by converting the Unity coroutine codes we worked on previously into Unitask.

Additionally, we will introduce the concept of simple twins and twins using DOTween.

If you know a little about Unity but want to develop more efficiently, take this course to learn about Unity coroutines and unitasks and use them for a long time!

Lecture Introduction

Unity Coroutine + UniTask

This course will teach you how to do asynchronous programming using Unity Coroutines and Unitasks.

I can confidently say that I will eventually be forced to use coroutines or unitasks.

Unity Coroutine?

Unity Coroutine is a representative technology used for asynchronous programming in Unity, allowing methods to be executed in multiple parts.

A function that allows you to suspend a method while it is executing, go to process another method, and then come back and resume the work is called a coroutine.

Representative functions include the following:

  • Run after a certain amount of time

  • Wait until the condition is met and then execute

  • Run after downloading image/video/audio/file

  • Asynchronous scene transitions

  • Repeat execution at regular intervals

UniTask?

Unitask is a feature that replaces C# Task and allows you to use asynchronous functions.

You can await all Unity AsyncOperations and coroutines, and replace or extend all the functionality of coroutines.

Conceptually, it is similar to a coroutine, but it is much more efficient and powerful.

Representative functions include the following:

  • All the features of coroutines


  • Ability to wait for the completion of multiple asynchronous tasks


  • Ability to flexibly interrupt tasks

  • Ability to track running tasks using UniTask Tracker

Introduction to the Practice

We have prepared various practical exercises using Unity and C#, coroutines, or unitasks.

This is a hands-on exercise to help you learn about coroutines and unitasks, first practicing with the coroutine version and then switching back to the unitask version.

We have removed as much unnecessary work as possible, such as UI layout, and prepared it so that only the core work can be carried out.

I hope this lab will give you a feel for asynchronous programming using Unity and coroutines or Unitask.

Things you can learn through practice

  • How to execute and stop sequentially/repeatedly using coroutines and unitasks


  • How to run coroutines and unitasks as Unity event methods

  • How to use Tween with coroutines and unitasks and use it with DOTween


  • How to switch or download scenes asynchronously using coroutines and unitasks


  • How to play a simple rock-paper-scissors game asynchronously using coroutines and unitasks.

  • How to Track Tasks with UniTask Tracker

Lecture Structure

Part 0 - Introduction and Conclusion

  1. introduction
    This section explains what this course is about and what asynchronous programming is.

  1. finish
    This section concludes by briefly explaining the learning objectives to be achieved after the lecture.

Part 1 - Coroutines

  1. Understanding Coroutines
    This section will teach you the concept of coroutines, their main keywords, and how to start and end them.


  1. Coroutine Basics
    This section teaches you the basics of how to use coroutines through the Coroutine Basics exercise.
    Learn how to use coroutines to execute sequentially, repeatedly, and interruptively, and learn the concept of simple tweens and how to use DOTween.

  1. Using Coroutines
    This section teaches you how to use coroutines through practical exercises using coroutines.
    You will learn how to use coroutines in a complex way by asynchronously switching scenes, asynchronously downloading files such as images, and creating a rock-paper-scissors game.

Part 2 - UniTask

  1. Understanding UniTask
    This section will teach you about the concept of Unitask, how to install it, key keywords, and how to start and stop it.

  1. UniTask Basics
    This section teaches you the basics of how to use Unitask through basic training.
    We will learn by converting the practice code used when learning coroutines into a UniTask version, and we will explain what the UniTask Tracker is and how to use it.

  1. Utilizing UniTask
    This section teaches you how to use Unitask through hands-on practice using Unitask.
    Similarly, we learn by changing the coroutine practice code to a unitask version.

Required/Used Equipment, OS, Programs

  • Computer Spec
    If you have a laptop, PC, or MacBook at the level of the LG Gram that can smoothly run the latest Unity editor, you can easily take the course.

  • OS
    Windows or MacOS
    Requires Windows or MacOS capable of running Unity.
    The lecture will be conducted on MacOS.

  • Unity Hub + Unity Editor (2023.2)
    The course will be taught using Unity 2023.2, but since it does not use features dependent on a specific version, it can be taught using most other versions.

Frequently Asked Questions

  • Can non-majors also take the course?
    Of course.
    There is little explanation of Unity's features, but since we are not using difficult or complex features and only using basic features such as text UI and button events, you should know the basic concepts and usage of C# and Unity to this extent.

  • Can I use the lecture materials elsewhere?
    Yes, it is possible.
    Please note that the font files and plugins included in the lecture sample project each have separate licenses. You may use the code freely.

  • Can you tell me more about TWIN or DOTween?
    no.
    This lecture focuses on coroutines and unitasks.
    However, since this lecture only covers the simple use of Tween and DOTween with coroutines and unitasks, I recommend that you learn the concept of Tween and DOTween through this lecture and try out various ways to utilize them.

point!

We've removed things unrelated to asynchronous programming, such as UI settings, and included only what's necessary for learning.

🚩 Check your player knowledge!

This lecture assumes that you have a basic knowledge of C# and Unity .
To take this course, you must know basic C# concepts and grammar, as well as how to use Unity.
For basic learning, we recommend Unity's basic learning page.

Recommended for
these people

Who is this course right for?

  • I know a little about Unity, but I want to know how to develop more flexibly.

  • Anyone who wants to create games or content as easily as possible

  • Anyone who wants to get a job as a developer using Unity

  • Anyone developing with Unity

  • Anyone who wants to learn a technique that many developers use for collaboration

  • For those looking for a development method that can be learned once and used over and over again

Need to know before starting?

  • C# Basics

  • Unity Basics

Hello
This is

767

Learners

48

Reviews

97

Answers

4.9

Rating

2

Courses

 

 

안녕하세요.
프리랜서 유니티 개발자이자 유니티 공인인증강사 오민석입니다.

게임학과에서 게임 개발을 전공했었고,
현재는 유니티로 PC/Mobile 게임이나 VR/AR/MR 컨텐츠를 만들거나, 온/오프라인 강의를 하고 있습니다.

 

강의 이력

- C#/Unity/VR/AR/MR 전문 교육 프로그램 50회/2000시간 이상 강의
(경기콘텐츠진흥원, 메타버스아카데미, 대구디지털산업진흥원, 한국생산성본부, 한국콘텐츠진흥원 등)

 

- 대학교 정규/특별 강의
(고려대, 공주대, 동서울대, 동아대, 배재대, 아주대, 연세대, 영산대, 한국기술교육대, 홍익대 등)

 

이메일

ominseok86@gmail.com

Curriculum

All

43 lectures ∙ (3hr 46min)

Course Materials:

Lecture resources
Published: 
Last updated: 

Reviews

All

6 reviews

5.0

6 reviews

  • necsinete9050님의 프로필 이미지
    necsinete9050

    Reviews 1

    Average Rating 5.0

    5

    40% enrolled

    코루틴에 대해서 자세히 알게되어서 좋은 것 같습니다. 실전에서 운용하기위하여 꼭 시청해야하 할 강의라고 생각이 들어요.

    • 까만돌님의 프로필 이미지
      까만돌

      Reviews 57

      Average Rating 4.8

      5

      30% enrolled

      소중한 강의 감사합니다.

      • 박남훈님의 프로필 이미지
        박남훈

        Reviews 1

        Average Rating 5.0

        5

        30% enrolled

        • 김도윤님의 프로필 이미지
          김도윤

          Reviews 1

          Average Rating 5.0

          5

          30% enrolled

          • bmo11152598님의 프로필 이미지
            bmo11152598

            Reviews 1

            Average Rating 5.0

            5

            30% enrolled

            $51.70

            ominseok's other courses

            Check out other courses by the instructor!

            Similar courses

            Explore other courses in the same field!