Unity 6.3
0 онлайн 86 гостей 3 в системе
Вход
Советы по повышению продуктивности в Unity 6 Глава 8 из 8 Оригинал, стр. 97

Рабочие процессы DevOps

Русский

Рабочие процессы DevOps

Советы по Unity Version Control Unity Version Control (UVCS) - масштабируемая, независимая от игрового движка система контроля версий и управления исходным кодом для студий разработки игр любого размера.

Если вы уже используете Unity Version Control с Unity 6, вот несколько недавних улучшений и советов, которые пригодятся вашей команде в повседневной работе.

Работайте параллельно в нескольких ветках без потери изменений с помощью Shelve и Switch Начиная с версии пакета UVCS 2.7.1 наборы отложенных изменений (shelvesets) позволяют временно сохранять текущие правки при переключении между ветками. Так незавершённая работа остаётся в безопасности и всегда доступна.

©2025UnityTechnologies

В окне Unity Version Control щёлкните правой кнопкой мыши по ветке, на которую хотите перейти, и выберите Switch workspace to this branch.

Окно Handle pending changes

Затем выберите, перенести изменения с собой или временно оставить их. Вариант Shelves обеспечивает большую гибкость: к изменениям можно вернуться, применить их повторно и поделиться ими с командой.

Вкладка Shelves в окне Unity Version Control

©2025UnityTechnologies

Упорядочьте список веток с помощью функции Hide/Unhide Если представление веток проекта стало перегруженным, используйте глобальную функцию Hide/Unhide: ветки можно скрыть прямо из контекстного меню, и они станут невидимыми для всей команды на всех платформах UVCS - в плагине Unity, Unity Dashboard и настольном приложении. Чтобы снова показать скрытые ветки, воспользуйтесь значком перечёркнутого глаза или контекстным меню списка Hidden branches (см. изображения ниже).

Значок перечёркнутого глаза в Unity Version Control

Команда Unhide в контекстном меню ветки

Защитите данные ассетов с помощью эксклюзивной блокировки Плагин UVCS для Unity Editor позволяет заблокировать ассет, чтобы другие пользователи не могли его изменить. Это помогает команде не потерять незавершённую работу и избавляет от операции слияния для файлов, которые невозможно объединить.

©2025UnityTechnologies

Чтобы включить поддержку блокировок, откройте Configure rules на вкладке File locks.

Команда Configure rules на вкладке File locks

Затем укажите репозиторий, целевую ветку - обычно основную - и расширения файлов, для которых требуется поддержка блокировок.

Окно Create Lock Rule в Unity Version Control

©2025UnityTechnologies

Чтобы избежать конфликтов, перед внесением изменений обязательно выполняйте Checkout для ассетов.

Команда Checkout в контекстном меню Unity Version Control

Подробнее о системе интеллектуальных блокировок можно узнать на странице Smart Locks. .

Защитите изменения с помощью Enable manual checkout for Unity Assets При работе с ассетами, не подлежащими слиянию, плагин UVCS для Unity автоматически выполняет Checkout файла после его изменения и сохранения. При таком порядке работы другой пользователь может успеть заблокировать тот же файл, не получив ваших изменений. Чтобы этого избежать, откройте настройки плагина UVCS, щёлкнув значок шестерёнки, и выберите Enable manual checkout for Unity Assets.

Параметр Enable Manual Checkout for Unity Assets

©2025UnityTechnologies

Этот параметр делает ассет доступным только для чтения, пока для него явно не выполнен Checkout. После выбора Checkout в Inspector файл становится редактируемым, а вы получаете эксклюзивную блокировку на его изменение.

Команда Checkout в Inspector

Asset Manager Если вам нужна система управления цифровыми ассетами - моделями, текстурами, аудиофайлами и другими материалами, - обратите внимание на Unity Asset Manager. Он поддерживает более 70 форматов файлов и помогает командам централизованно хранить, упорядочивать, находить и беспрепятственно использовать ассеты в разных проектах. В зависимости от задач работайте с Asset Manager через веб-интерфейс или интеграцию с Editor.

©2025UnityTechnologies

Управляйте ассетами, просматривайте и упорядочивайте их в удобном браузере Веб-интерфейс обеспечивает быструю асинхронную совместную работу всех участников команды и заинтересованных сторон проекта. В нём можно создавать коллекции и управлять ими, перемещать ассеты между коллекциями и проектами, а также отслеживать изменения по истории версий.

Можно легко загружать один или несколько файлов, сразу добавляя их в нужные коллекции и назначая теги. Это упрощает структурирование ассетов и совместную проверку и доработку материалов. Ассеты можно дополнять пользовательскими метаданными: администраторы, владельцы и менеджеры могут определять новые поля текстовые, логические и числовые, - а все пользователи могут добавлять теги, в том числе предложенные ИИ, чтобы ещё лучше упорядочить содержимое.

Работа с ассетами в веб-интерфейсе Asset Manager

Dependency Viewer наглядно показывает связи между ассетами: что требуется каждому ассету и какие элементы зависят от него. В Dependency Viewer доступны как входящие, так и исходящие зависимости.

©2025UnityTechnologies

Пример зависимостей ассетов в Dependency Viewer

Управляйте ассетами в Editor без отрыва от работы Пакет Unity Asset Manager интегрируется с Unity Editor и позволяет управлять ассетами, не прерывая рабочий процесс. После установки можно загружать ассеты в Unity Cloud и импортировать их оттуда, а также получать через поисковый интерфейс Editor доступ к ассетам всех своих проектов.

Решение, встроенное в Editor, также упрощает повторное использование префабов, скриптов и других межпроектных компонентов. Это ускоряет итерации и позволяет командам сосредоточиться на совершенствовании рабочих процессов и оптимизации.

Доступ к Asset Manager из Unity Editor

©2025UnityTechnologies

Чтобы быстро находить нужные ассеты, фильтруйте их по автору, состоянию, типу, времени обновления или состоянию импорта. Плагин автоматически определяет зависимости между ассетами. Например, если несколько префабов используют один материал, будет загружен только один его экземпляр. Это оптимизирует хранилище и предотвращает ненужное дублирование. Подробнее о Unity Asset Manager можно узнать из следующих материалов: - Видеоурок: краткое руководство по Asset Manager в Unity - Unity Learn: Unity Asset Manager - краткое руководство по началу работы - Статья: введение в способы передачи данных Asset Manager в Unity

Unity Build Automation Unity DevOps Build Automation, ранее известный как Cloud Build, - готовое решение для непрерывной интеграции и развёртывания (CI/CD), способное выполнять и развёртывать билды в облаке. Оно позволяет чаще собирать и выпускать более качественные и инновационные версии. Build Automation можно за несколько минут подключить к любому репозиторию системы контроля версий и настроить на ручной запуск либо автоматическую сборку после фиксации изменений. Сервис поддерживает множество платформ, включая iOS, Android, Windows и Unity Web, поэтому не требуется обслуживать отдельную инфраструктуру сборки для каждой платформы.

Начиная с Unity 6.1 Build Automation полностью интегрирован с Editor: теперь можно запускать быстрые проверочные билды из локальных веток, используя свои настройки автоматизации сборки.

Делитесь настройками сборки и повторно используйте их в команде Пакет Build Automation можно установить из окна Build Profiles или через Package Manager. После установки пакета под выбранным профилем появится новый раздел Build Automation Settings. Эти параметры определяют, как Unity будет автоматизировать сборки.

©2025UnityTechnologies

Раздел Build Automation Settings в окне Build Profiles

Для Android, iOS и других платформ, требующих учётных данных, их необходимо настроить в Unity Dashboard. Чтобы создать новые учётные данные, нажмите New рядом с раскрывающимся списком Credentials. Откроется новое окно в панели Build Automation, где можно создать набор учётных данных. Подробнее об учётных данных и подписывании приложений см. в документации Unity Build Automation.

Окно настройки Credentials в Unity Dashboard

©2025UnityTechnologies

Сохранив учётные данные, вернитесь в окно Build Profiles и нажмите Refresh list. Учётные данные должны появиться в раскрывающемся списке. Параметры сборки автоматически сохраняются в профиле, поэтому их можно повторно использовать и передавать другим участникам команды.

Тестируйте незавершённую работу с помощью Shelve and Build Когда параметры настроены и всё готово к сборке, нажмите Cloud Build в профиле сборки. Unity начнёт обработку билда в облаке.

Параметры Cloud Build в профиле сборки

©2025UnityTechnologies

Если в проекте есть ожидающие изменения, появится вариант Shelve and Build. Он позволяет собрать локальные изменения, не отправляя их в основной репозиторий, что удобно для тестирования незавершённой работы.

Shelve and Build для ожидающих изменений

Если ожидающих изменений нет, Unity создаст билд из последнего коммита текущей ветки.

Отслеживайте сборку, устраняйте неполадки и загружайте результаты в Build History Сразу после начала сборки Editor откроет окно Build History, где можно отслеживать ход выполнения и состояние билда. В этом представлении доступны журналы и артефакты сборки, поэтому устранять неполадки и загружать результаты удобно.

Окно Build History

©2025UnityTechnologies

Для быстрого распознавания каждое состояние имеет свою цветовую маркировку; также доступны нужные действия - например, перезапуск неудачной сборки или загрузка журнала. Полное описание всех значков состояний приведено на этой странице документации.

Делитесь с участниками команды ссылками на артефакты сборки После успешного завершения сборки можно загрузить её артефакты или поделиться с участниками команды ссылками на них.

Загрузка артефактов успешных сборок

Для неудачных сборок можно загрузить журналы и изучить их подробнее. Подробнее о Build Automation рассказывается в видеоуроке «Начало работы с Build Automation в Unity» и руководстве Unity Learn «Unity Build Automation: краткое руководство по началу работы».

Unity Build Server Если требуется оптимизировать и автоматизировать сборку, компиляцию и упаковку проектов Unity - особенно в крупных командах и организациях, - попробуйте Unity Build Server.

Это средство управления лицензиями предоставляет плавающие лицензии на сборку для Unity: несколько машин могут выполнять сборку без отдельной полной лицензии Unity Editor для каждой из них. Оно станет полезным дополнением к автоматизированному конвейеру сборки и средам непрерывной интеграции (CI). Чтобы начать работу с Unity Build Server, разверните Unity Licensing Server на центральном сервере своей сети и добавьте на него лицензии Unity Build Server. Затем настройте каждую машину сборки так, чтобы при необходимости собрать проект она запрашивала лицензию у Build Server.

Unity Licensing Server, используемый в решении Build Server, может одновременно обслуживать на одном сервере несколько типов подписки. Этот же сервер можно использовать для выдачи разработчикам плавающих лицензий по подписке Unity Enterprise Floating или Unity Industry Floating. Пример показан на изображении ниже.

©2025UnityTechnologies

Требования к Unity Build Server, порядок настройки и начало работы описаны в документации Unity Licensing Server.

Две активные подписки: Unity Build Server (для машин сборки) и Unity Enterprise Floating (для разработчиков).

Демонстрационные проекты В этой подборке есть проекты с игровыми интерфейсами, демонстрирующими рабочие процессы UI Toolkit и UI Builder, примеры различных паттернов проектирования и архитектуры проекта, а также образцы возможностей двумерного освещения и визуальных эффектов Universal Render Pipeline (URP) в Unity 6.

- Happy Harvest - демонстрационный 2D-проект - Gem Hunter Match - демонстрационный 2D-проект - Dragon Crashers - демонстрационный проект UI Toolkit - QuizU - демонстрационный проект UI Toolkit —

©2025UnityTechnologies

Paddle Game ScriptableObjects

- Совершенствуйте код с помощью паттернов проектирования и SOLID - Руководство по стилю кода C# —

Fantasy Kingdom

- Примеры Shader Graph - Демонстрационное содержимое VFX Learning Templates - Демонстрационный 3D-проект URP - Демонстрационная сцена HDRP —

HDRP Time Ghost

- Шаблон многопользовательского проекта VR - Шаблон многопользовательского проекта MR - Примеры UGS

Материалы для всех пользователей Unity

В центре рекомендаций Unity можно загрузить множество других электронных книг для опытных разработчиков и авторов контента Unity. Выберите любое из более чем 30 руководств, подготовленных отраслевыми экспертами, инженерами Unity и техническими художниками: в них собраны рекомендации по эффективной разработке игр с использованием инструментов и систем Unity. Советы, рекомендации и новости также доступны в Unity Blog, на форумах сообщества Unity, в Unity Learn и по хэштегу #unitytips.

©2025UnityTechnologies

English

DevOps workflows

Unity Version Control tips Unity Version Control (UVCS) is a scalable, engine-agnostic version control and source code management tool for game development studios of all sizes. If you’re already using Unity Version Control with Unity 6, here are some of the latest updates and tips that your team could use in your day-to-day work.

Work on multiple branches in parallel, without losing your work, with Shelve and Switch Starting with UVCS package version 2.7.1, you can use shelvesets to temporarily save your current changes when switching between branches, to make sure your unfinished work is safely stored and easily accessible.

In your Unity Version Control window, right-click the branch you’d like to switch to and select Switch workspace to this branch.

The Handle pending changes window

Then choose whether you want to carry your changes or leave them behind temporarily. The Shelves option provides great flexibility by allowing you to revisit your changes, re-apply them, and share them with your team.

The Shelves tab in the Unity Version Control window

Declutter your branches view with the Hide/Unhide feature When your project’s branches view becomes cluttered, you can use the global Hide/Unhide feature to hide branches directly from the context menu, making them invisible for your entire team across all UVCS platforms (Unity plugin, Unity Dashboard, or the Desktop application). You can make Hidden branches visible again by using the “strikethrough eye” icon or from the context menu of the Hidden branches list (see images below).

The strikethrough eye icon in Unity Version Control

The “Unhide” option in the branch context menu

Avoid losing asset data with the exclusive lock option The UVCS plugin for the Unity Editor allows you to lock an asset to prevent others from modifying it. This helps the team to avoid losing any work-in-progress data and removes the merge operation for files that can’t be merged.

To enable the lock support go to Configure rules in the File locks tab.

The Configure rules option in the File locks tab

Then configure the repository, the destination branch (usually the main branch), and the file extensions you want in order to enable the lock support.

The Create Lock Rule in Unity Version Control

To avoid conflicts, make sure to check out the assets before making changes.

The Checkout option from the Unity Version Control context menu

If you want to learn more about the smart locks system check out the Smart Locks page.

Protect your changes with “Enable manual checkout for Unity Assets” When working with unmergeable assets, the UVCS Unity plugin will automatically check out a file after you modify and save it. This workflow leaves room for someone else to lock the same file without your changes. To avoid this from happening, go to the UVCS plugin settings via clicking on the gear icon, and select the option Enable manual checkout for Unity Assets.

The Enable Manual Checkout for Unity Assets option

This preference makes the asset read-only until it’s explicitly checked out. When you click the Checkout option in the Inspector, your file becomes editable and you’ll get the exclusive lock to change it.

The Checkout option in the Inspector

Asset Manager If you’re looking for a digital asset management system to manage your assets, such as models, textures, audio files, etc., then check out Unity’s Asset Manager. It supports over 70 file formats to help teams centralize, organize, discover, and use assets seamlessly across projects. Use the Asset Manager via the web interface or through the Editor integration, depending on your needs.

Manage, view, and organize your assets in your preferred browser The web interface enables asynchronous, speedy collaboration among all team members and stakeholders involved in your projects. Through the web interface, you can create and manage collections, move assets between collections or projects, and track changes with version history. You can easily upload single or multiple files while adding relevant collections and tags, making it straightforward to structure your assets and collaborate with your team to review and improve them. You can enrich assets with custom metadata, where admins, owners, and managers can define new metadata fields – like text, Boolean, and numeric field types – while all users can add tags, including AI-suggested tags, for overall better organization.

Working with assets in the web interface of the Asset Manager

The Dependency Viewer reveals asset relationships at a glance, showing what each asset needs and what depends on it. Both upstream and downstream dependencies are available in the Dependency Viewer.

An example of asset dependencies in the Dependency Viewer

Manage assets without any disruptions in the Editor The Unity Asset Manager package integrates with the Unity Editor, allowing you to manage assets without disrupting your workflow. After installing it, you can upload assets to, and import them from, the Unity Cloud, as well as access assets from all your projects through the Editor’s search interface. The in-Editor solution also makes it easier to reuse prefabs, scripts, and other cross-project components, speeding up iteration time and enabling teams to focus on better workflows and optimization.

Accessing the Asset Manager from the Unity Editor

To help you locate specific assets efficiently, make sure to filter by creator, status, type, update time or import status. The plugin automatically detects dependencies across assets. For example, if multiple prefabs use the same material, only one instance of the material is uploaded. This ensures optimized storage and prevents unnecessary duplication. Learn more about the Unity Asset Manager from the following resources: —

Video tutorial: A quick guide to the Asset Manager in Unity

Unity Learn: Unity Asset Manager: Quick start guide

Article: Introduction to Asset Manager transfer methods in Unity

Unity Build Automation Unity DevOps Build Automation, formerly known as Cloud Build, is a turnkey continuous integration and deployment (CI/CD) solution that can execute and deploy builds in the cloud. It empowers you to build and release more often for higher-quality, more innovative releases. Build Automation can be connected to any source control repository in a matter of minutes and set up to execute builds manually or automatically once any change is committed to version control. Build Automation also supports multiple platforms including iOS, Android, Windows, and Unity Web, eliminating the need to maintain unique build infrastructure for every platform. As of Unity 6.1, Build Automation is now fully integrated with the Editor and you can run quick validation builds from local branches with your build automation settings.

Share and reuse build settings across your teams You can install the Build Automation package from the Build Profiles window or from the Package Manager. Once you install the package, a new section labeled Build Automation Settings will appear under your selected profile. These settings allow you to define how Unity automates your builds.

The Build Automation Settings section in your Build Profiles window

For Android, iOS, and other platforms that require credentials, you’ll have to configure the credentials in the Unity Dashboard. To create new credentials, click on the New button next to the Credentials drop-down. This opens a new window in the Build Automation dashboard where you can create a new set of credentials. To learn more about credentials and app signing make sure to check out the Unity Build Automation documentation.

Credentials configurations window in the Unity Dashboard

Once you save your credentials, go back to the Build Profiles window and click on Refresh list. You should see the credentials in the drop-down list. The build settings are automatically saved to your build profile, which means you can reuse and share across your team.

Test work in progress with Shelve and Build Once you’ve configured your settings, and you’re ready to run a build, click the Cloud Build button in your build profile. Unity will then begin processing your build in the cloud.

Cloud Build settings in your build profile

If you have pending changes in your project, you’ll be prompted with the option to Shelve and Build. This allows you to build your local changes without pushing them to the main repository which is ideal for testing work in progress.

Shelve and Build pending changes

If you have no pending changes, Unity will create a build using the latest commit from the branch you currently have checked out.

Track build progress, troubleshoot, and download results with Build History As soon as the build begins, the Editor will open the Build History window where you can monitor its progress and the build status. This view provides logs and access to the build artifacts, allowing you to troubleshoot or download results easily.

Build History window

Each status is color-coded for quick visibility and allows you to take actions, e.g., rerun failed builds or download the log. Check out this documentation page to get a full overview of what each status symbol means.

Share build artifacts links with your team members Once builds are successfully completed, you can download the build artifacts or share links with team members.

Download build artifacts for successful builds

For failed builds, you can download the logs for further inspection. Learn more about Build Automation from the Getting started with Build Automation in Unity video tutorial and the Unity Build Automation: Quick start guide tutorial on Unity Learn.

Unity Build Server If you want to streamline and automate the process of building, compiling, and packaging Unity projects, especially across larger teams and organizations, try Unity Build Server. This is a license management tool that enables floating build licenses for Unity, allowing multiple machines to build without requiring a full Unity Editor license for each machine. It is a great addition to your automated build pipeline and continuous integration (CI) environments. To start using Unity Build Server, you can deploy the Unity Licensing Server software on a central server in your network and add your Unity Build Server licenses to this server. Then, you can configure each build machine to request a build license from the Build Server when it needs to build a project. The Unity Licensing Server that is used in the Build Server solution can support more than one type of subscription on the same server. Customers can use the same server to distribute floating licenses to the developers using a Unity Enterprise Floating or a Unity Industry Floating subscription. See an example in the image below.

You can learn more about the requirements for Unity Build Server, how to set it up, and how to get started from the Unity Licensing Server documentation.

Two active subscriptions: Unity Build Server (for build machines) and Unity Enterprise Floating (for developers).

Sample projects From sample projects that provide game interfaces that showcase UI Toolkit and UI Builder workflows, or samples demonstrating various design patterns and project architecture, as well as those that showcase capabilities of 2D lighting and visual effects in the Universal Render Pipeline (URP) in Unity 6, we’ve got you covered with these projects. —

Happy Harvest - 2D Sample Project

Gem Hunter Match - 2D Sample Project

Dragon Crashers - UI Toolkit Sample Project

QuizU - A UI Toolkit sample

Paddle Game ScriptableObjects

Level up your code with design patterns and SOLID

C# Code style guide

Fantasy Kingdom

Shader Graph samples

VFX Learning Templates Sample Content

URP 3D sample

HDRP sample scene

HDRP Time Ghost

VR Multiplayer Template

MR multiplayer template

UGS samples

Resources for all Unity users

You can download many more e-books for advanced Unity developers and creators from the Unity best practices hub. Choose from over 30 guides, created by industry experts, and Unity engineers and technical artists, that provide best practices for efficient game development with Unity’s toolsets and systems. You’ll also find tips, best practices, and news on the Unity Blog and Unity community forums, as well as through Unity Learn and the #unitytips hashtag.