Как импортировать ассет в unity
Asset Packages
Unity packages are a handy way of sharing and re-using Unity projects and collections of assets; Unity Standard Assets and items on the Unity Asset Store are supplied in packages, for example.
Packages are collections of files and data from Unity projects, or elements of projects, which are compressed and stored in one file, similar to Zip files. Like Zip files, a package maintains its original directory structure when it is unpacked, as well as meta-data about assets (such as import settings and links to other assets).
In Unity, the menu option Export Package compresses and stores the collection, while Import Package unpacks the collection into your currently open Unity project.
This page contains information on:
Import Package
You can import Standard Asset Packages, which are asset collections pre-made and supplied with Unity, and Custom Packages, which are made by people using Unity.
Choose __Assets > Import Package > __ to import both types of package.
Import Package menu»> Fig 1: Asset>Import Package menu
Standard Asset Packages
Unity ‘Standard Assets’ consist of several different packages: __ 2D, Cameras, Characters, CrossPlatformInput, Effects, Environment, ParticleSystems, Prototyping, Utility, Vehicles__.
To import a new Standard Asset package:
Open the project you want to import assets into.
Choose Assets > Import Package > __ plus the name of the package you want to import, and the Import Unity Package__ dialog box displays, with all the items in the package pre-checked, ready to install. (See Fig 2: New install Import Unity Package Dialog Box.)
Select Import and Unity puts the contents of the package into a Standard Asset folder, which you can access from your Project View.
Fig 2: New install Import Unity Package dialog box
Custom Packages
You can import custom packages which have been exported from your own projects or from projects made by other Unity users.
To import a new custom package:
Open the project you want to import assets into.
Choose __Assets > Import Package > Custom Package… __ to bring up up File Explorer (Windows) or Finder (Mac).
Select the package you want from Explorer or Finder, and the Import Unity Package dialog box displays, with all the items in the package pre-checked, ready to install. (See Fig 4: New install Import Unity Package dialog box.)
Select Import and Unity puts the contents of the package into the Assets folder, which you can access from your Project View.
Fig 4: New install Import Unity Package dialog box
Export Package
Use Export Package to create your own Custom Package.
HINT: When exporting a package Unity can export all dependencies as well. So, for example, if you select a Scene and export a package with all dependencies, then all models, textures and other assets that appear in the scene will be exported as well. This can be a quick way of exporting a bunch of assets without manually locating them all.
Fig 6: Exporting Package dialog box
Exporting Updated Packages
Sometimes you may want to change the contents of a package and create a newer, updated version of your asset package. To do this:
Select the asset files you want in your package (select both the unchanged ones and the new ones).
Export the files as described above in Export Package, above.
NOTE: You can re-name an updated package and Unity will recognise it as an update, so you can use incremental naming, for example: MyAssetPackageVer1, MyAssetPackageVer2.
HINT: It is not good practise to remove files from packages and then replace them with the same name: Unity will recognise them as different and possibly conflicting files and so display a warning symbol when they are imported. If you have removed a file and then decide to replace it, it is better to give it a different, but related name to the original.
Как мне установить или обновить Standard Assets (встроенный набор стандартных ассетов)?
Unity ships with multiple Standard Assets. These are collections of assets that are widely used by most Unity customers. These are: 2D, Cameras, Characters, CrossPlatformInput, Effects, Environment, ParticleSystems, Prototyping, Utility, Vehicles.
Unity transfers Standard Assets into and out of projects using Unity packages.
Как мне установить или обновить Standard Assets (встроенный набор стандартных ассетов)?
See Asset Packages for information about installing (importing) Standard Assets, as well as sharing Custom Packages between projects and via the Asset Store.
Import Package menu»> Asset>Import Package menu
Standard Assets Do Not Upgrade Automatically
When you create a new project in Unity, you can choose to include Standard Assets collections in your project. Unity copies the assets you choose to include from the Unity install folder into your new project folder. This means that if you upgrade your Unity Editor to a newer version, the Standard Assets you have already imported into your project do not upgrade: You have to manually upgrade them.
HINT: A newer version of a Standard Asset might behave differently to your existing install (for performance or quality reasons, for example). A newer version might make your project look or behave differently and you may need to re-tweak its parameters. Check the package contents and Unity’s release notes before you decide to re-install.
Re-install Standard Assets, Upgrade Standard Assets, Upgrading Standard Assets, Install Standard Assets, Installing Standard Assets, Import Standard Assets, Importing Standard Assets
Как мне импортировать модели из моего 3D редактора?
Для импорта 3D модели в Unity вы должны перетащить файл модели в окно проекта.
В инспекторе > вкладка Model Unity поддерживает импорт моделей из всех популярных 3D редакторов.
Особенности импорта из разных 3D пакетов смотрите на следующих страницах:
Текстуры
3D форматы
Импортирование мешей в Unity может быть выполнено с помощью двух основных типов файлов:
Любой из этих типов позволит вам добавлять свои меши в Unity, но есть соображения относительно того типа, который вы выберите:
Экспортированные 3D файлы
Преимущества:
Недостатки:
Собственные файлы 3D приложений
Преимущества:
Недостатки:
Модели
Файлы моделей, размещенные в папке Assets внутри проекта Unity, автоматически импортируются и сохраняются как ассеты Unity.
Файл модели может содержать 3D модель персонажа, здания или части мебели. Модель импортируется в виде набора ассетов. В окне Project(проект) главный импортированный объект представляется в виде Model Prefab(префаб модели). Обычно также существует несколько Mesh объектов, на которые ссылается Model Prefab.
Файл модели может также содержать данные анимации, которые можно использовать для анимации данной модели или других моделей. Данные анимации импортируется как один или несколько Анимационных Клипов.
![Mesh Filter вместе с Mesh Renderer позволяет появляться модели на экране.](../uploads/Main/MeshExample40.png)
Настройки импорта для мешей
Import Settings для модели будут показаны в закладке Model инспектора FBX импортера, когда модель выделена. Это влияет на меш, его нормали и импортированные материалы. Настройки применяются для каждого ассета на диске, поэтому, если вам нужен ассет с другими настройками, создайте (и соответственно переименуйте) копию файла.
Хотя изначально настроек по умолчанию может быть достаточно, будет лучше, если вы изучите список настроек, перечисленных ниже. Они могут помочь определить, что вы желаете сделать с игровым объектом.
Некоторые общие корректировки, для примера, могут быть следующими:
Importing assets
You can bring assets created outside of Unity into your Unity project. To do this, you can either export the file directly into the Assets folder for your project, or copy it into that folder. For many common formats, you can save your source file directly into your project’s Assets folder and Unity can read it. Unity also detects when you save new changes to the file and re-imports files as necessary.
When you create a Unity project, Unity creates a folder (named after your project) which contains the following subfolders:
You can save or copy files that you want to use in your project into the Assets folder, and you can use the Project window A window that shows the contents of your Assets folder (Project tab) More info
See in Glossary inside Unity to view the contents of your Assets folder. Therefore, if you save or copy a file to your Assets folder, Unity imports it and appears in your Project window.
When you modify a file in Unity, Unity does not modify your original source file, even though you can often choose between various ways to compress, modify, or otherwise process the asset within Unity. Instead, the import process reads your source file, and creates a game-ready representation of your asset internally, matching your chosen import settings. If you modify the import settings for an asset, or make a change to the source file in the Assets folder, Unity re-imports the asset again to reflect your changes.
Warning: In most cases, the items that appear in your Project window represent actual files on your computer. If you delete them within the Unity Editor Project window, you also delete them from your computer.
Unity automatically detects files as they are added to the Assets folder, or if they are modified. When you put any asset into your Assets folder, it appears in your Project window.
The Project window shows Assets that Unity has imported into your project
If you drag a file from your computer’s file browser into Unity’s Project window, Unity makes a copy and places it into your Assets folder. You can then access this copy from the Project window.
Asset Import Settings
Clicking on an image asset in the Project window shows the import settings for that asset in the Inspector
For other asset types, the import settings look different. The various settings you see relate to the type of asset selected. Here’s an example of an Audio asset, with its related import settings shown in the inspector:
An Audio asset selected in the Project window shows the Audio import settings for that asset in the Inspector
If you are developing a cross-platform project, you can override the “default” settings and assign different import settings on a per-platform basis.
Asset processing
Unity reads and processes any files that you add to the Assets folder, and converts the contents of the file to internal game-ready data. The asset files themselves remain unchanged, and the internal data is stored in the project’s Library folder. This data is part of the Unity Editor’s Asset Database.
Note: If your project is not open in Unity, you can safely delete the Library folder, because Unity can regenerate all of its data from the Assets and ProjectSettings folders the next time you launch your project.
Complex assets
In some cases, Unity might create multiple assets while importing a single asset file. For example:
Importing from the Asset Store
Unity users can become publishers on Asset Store, and sell content they have created. To find out more, see Asset Store Publishing.
Asset Store. Доступ и навигация
Страница Asset Store.
Магазин имеет интерфейс браузера, который позволяет искать по словам или просматривать товары (packages) и категории. В левой части главной панели инструментов находятся знакомые кнопки навигации, для перемещения по истории просмотренных страниц:-
Справа от них находятся кнопки просмотра менеджера загрузок и содержимого корзины покупок.
Менеджер загрузок позволяет просматривать пакеты, которые вы купили, а также искать и устанавливать обновления. Кроме того, стандартные пакеты, поставляемые с Unity, можно также просматривать и добавлять в проект через данный менеджер.
Менеджер загрузок.
Расположение загруженных ассетов
Вам редко когда понадобится (если вообще понадобится) прямой доступ к файлам, загруженным через Asset Store. Но, если вам потребуется, вы можете их найти в
..на Windows. Эти папки содержат подпапки, которые соответствуют продавцам на Asset Store, а ассеты находятся в соответствующих подпапках.