- Популярные видео
- Авто
- Видео-блоги
- ДТП, аварии
- Для маленьких
- Еда, напитки
- Животные
- Закон и право
- Знаменитости
- Игры
- Искусство
- Комедии
- Красота, мода
- Кулинария, рецепты
- Люди
- Мото
- Музыка
- Мультфильмы
- Наука, технологии
- Новости
- Образование
- Политика
- Праздники
- Приколы
- Природа
- Происшествия
- Путешествия
- Развлечения
- Ржач
- Семья
- Сериалы
- Спорт
- Стиль жизни
- ТВ передачи
- Танцы
- Технологии
- Товары
- Ужасы
- Фильмы
- Шоу-бизнес
- Юмор
Tracking Task Progress in Unity
Let's start expanding on the SVGs in Unity project we started that converts SVG's into an image format that is usable by Unity (https://www.youtube.com/watch?v=dnDz4lVbMWw) by moving the process into a background process we can track using the new Unity Progress API.
The Progress API allows us to create a progress tracker that displays the progress of long running background tasks in Unity without blocking the user while they run. This can be used to track Tasks you might run like our SVG renderer and also gives us a way to provide a feature for the user to cancel the task mid-execution.
The Unity Progress API works through a series of static methods that track Progress by a unique identifier (an `int`). These identifiers are how you can track a task over time. For example:
```csharp
Task.Run(async () =˃ {
int progressId = Progress.Start("My Task");
await Task.Delay(5000);
Progress.Finish(progressId);
});
```
We can add additional features to this as well including children tasks, step tracking, pausing and canceling tasks as well. We explore some of those throughout the implementation of the features for my own SVG generator in this video, but you can also find out a lot more about all of the features available to you in the Progress API documentation on the Unity website.
I was suggested to checkout the Progress API by Jason Storey, you can find his channel with loads of other helpful Unity and Game Dev tips at https://www.youtube.com/c/JasonStorey
You can find more information about the Unity Progress API here: https://docs.unity3d.com/ScriptReference/Progress.html
Join the World of Zero Discord Server: https://discord.gg/hU5Kq2u
Видео Tracking Task Progress in Unity канала World of Zero
The Progress API allows us to create a progress tracker that displays the progress of long running background tasks in Unity without blocking the user while they run. This can be used to track Tasks you might run like our SVG renderer and also gives us a way to provide a feature for the user to cancel the task mid-execution.
The Unity Progress API works through a series of static methods that track Progress by a unique identifier (an `int`). These identifiers are how you can track a task over time. For example:
```csharp
Task.Run(async () =˃ {
int progressId = Progress.Start("My Task");
await Task.Delay(5000);
Progress.Finish(progressId);
});
```
We can add additional features to this as well including children tasks, step tracking, pausing and canceling tasks as well. We explore some of those throughout the implementation of the features for my own SVG generator in this video, but you can also find out a lot more about all of the features available to you in the Progress API documentation on the Unity website.
I was suggested to checkout the Progress API by Jason Storey, you can find his channel with loads of other helpful Unity and Game Dev tips at https://www.youtube.com/c/JasonStorey
You can find more information about the Unity Progress API here: https://docs.unity3d.com/ScriptReference/Progress.html
Join the World of Zero Discord Server: https://discord.gg/hU5Kq2u
Видео Tracking Task Progress in Unity канала World of Zero
world of zero lets make unity c# csharp unity 3d unity3d unity (game engine) unity game development unity editor unity editor tools unity Progress unity Progress tracker unity background tasks unity tasks unity progress details unity task tracker dotnet .net c sharp unity games unity development unity programming unity coding game engine game development programming gamedev unity gamedev custom editor tool how to UnityEditor unity progress api code
Комментарии отсутствуют
Информация о видео
25 декабря 2022 г. 1:55:26
00:21:34
Другие видео канала





















