| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151 | .. _doc_import_process:Import process==============Importing assets in Godot-------------------------To import assets in Godot, place your assets (image files, scenes, audiofiles, fonts, etc) directly in the project folder. There are 2 ways to achieve this:- **For any file type:** Copy files manually with your operating system's file manager.- **For file types that can be imported by Godot:**  Drag-and-drop files from the operating system's file manager to the editor's FileSystem dock.  This only works with *resource* file types (i.e. file types that Godot can import).Godot will automatically import these files internally and keep the importedresources hidden in a ``res://.godot/imported/`` folder.This means that when trying to access imported assets through code, youneed to use the :ref:`Resource Loader<class_ResourceLoader>` as it willautomatically take into account where the internal files are saved. If youtry and access an imported asset using the :ref:`FileAccess <class_FileAccess>` class,it will work in the editor, but **it will break in the exported project**.However, the :ref:`Resource Loader<class_ResourceLoader>` cannot accessnon-imported files. Only the :ref:`FileAccess <class_FileAccess>` class can.Changing import parameters--------------------------.. note::    Import parameters are only present in *non-native* Godot resource types.    This means Godot's own scene and resource file formats (``.tscn``, ``.scn``,    ``.tres``, ``.res``) don't have import options you can select in the Import    dock.To change the import parameters of an asset in Godot, select the relevantresource in the FileSystem dock:.. image:: img/import_process_example.webpAfter adjusting the parameters, click **Reimport**. Be careful: if you selectanother file in the FileSystem dock before clicking **Reimport**, changes willbe discarded. After clicking **Reimport**, the chosen parameters will only beused for this asset and on future reimports.Changing the import parameters of several assets at the same time is alsopossible. Select all of them together in the FileSystem dock and theexposed parameters will apply to all of them when reimporting.Reimporting multiple assets---------------------------While working on a project you may find that several assets need to havethe same parameters changed, such as enabling mipmaps, but you only wantthose specific parameters changed. To do this, select every asset you wantto reimport in the file system. In the import tab there will now be acheckbox to the left of every import parameter... image:: img/reimport_multiple.pngSelect the checkbox of the parameters you want to change on your importedassets, then change the parameters normally. Finally, click the reimportbutton and every selected asset will be reimported with only thoseparameters changed.Automatic reimport------------------When the MD5 checksum of the source asset changes, Godot will perform anautomatic reimport of it, applying the preset configured for that specificasset.Files generated---------------Importing will add an extra ``<asset>.import`` file next to the source file,containing the import configuration.**Make sure to commit these files to your version control system**, as thesefiles contain important metadata.::    ls    example.png    example.png.import    project.godotAdditionally, extra assets will be present in the hidden``res://.godot/imported/`` folder:::    ls .godot/imported    example.png-218a8f2b3041327d8a5756f3a245f83b.ctex    example.png-218a8f2b3041327d8a5756f3a245f83b.md5If any of the files present in this folder is erased (or the whole folder), theasset or assets will be reimported automatically. As such, committing the``.godot/`` folder to the version control system is not recommended. Whilecommitting this folder can shorten reimporting time when checking out on anothercomputer, it requires considerably more space and bandwidth.The default version control metadata that can be generated on project creationwill automatically ignore the ``.godot/`` folder.Changing import resource type-----------------------------Some source assets can be imported as different types of resources. For this,select the relevant type of resource desired then click **Reimport**:.. image:: img/import_process_changing_import_type.webpSelect ``Keep File (exported as is)`` as resource type to skip file import, fileswith this resource type will be preserved as is during project export.Select ``Skip File (not exported)`` as resource type to skip file import and ignorefile during project export.Changing default import parameters----------------------------------Different types of projects might require different defaults. Changing the importoptions to a predefined set of options can be achieved by using the**Preset...** Menu. Besides some resource types offering presets, the defaultsettings can be saved and cleared too:.. image:: img/import_process_change_preset.webpThe default import parameters for a given resource type can be changedproject-wide using the **Import Defaults** tab of the Project Settings dialog:.. image:: img/import_process_import_defaults.webpFurther reading---------------This workflow takes a little time to get used to, but it enforces a more correctway to deal with resources.There are many types of assets available for import. Continue reading tounderstand how to work with all of them:- :ref:`doc_importing_images`- :ref:`doc_importing_audio_samples`- :ref:`doc_importing_3d_scenes`- :ref:`doc_importing_translations`
 |