import_process.rst 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. .. _doc_import_process:
  2. Import process
  3. ==============
  4. Importing assets in Godot 3.0+
  5. ------------------------------
  6. Previously, importing assets in Godot 2.x required manual maintenance
  7. of a separate directory with source assets. Without doing this, it was
  8. impossible to specify how to convert and change import flags for
  9. textures, audios, scenes, etc.
  10. In Godot 3.0, we use a more modern approach to importing: Simply drop
  11. your assets (image files, scenes, audios, fonts, etc) directly in the
  12. project folder (copy them manually with your OS file explorer).
  13. Godot will automatically import these files internally
  14. and keep the imported resources hidden in a res://.import folder.
  15. This allows changing all the import parameters transparently.
  16. Changing import parameters
  17. --------------------------
  18. Changing the import parameters of an asset in Godot (again, keep in mind
  19. import parameters are only present in non-native Godot resource types) is
  20. easy. Select the relevant resource in the filesystem dock:
  21. .. image:: img/asset_workflow1.png
  22. Then, after adjusting the parameters, press "Reimport". The parameters
  23. used will be only for this asset and will be used on future reimports.
  24. Changing import parameters of several assets at the same time is also
  25. possible. Simply select all of them together in the resources dock and the
  26. exposed parameters will apply to all of them when reimporting.
  27. Automatic reimport
  28. ------------------
  29. When the MD5 checksum of the source asset changes, Godot will perform an
  30. automatic reimport of it, applying the preset configured for that specific
  31. asset.
  32. Files generated
  33. -----------------
  34. Importing will add an extra <asset>.import file, containing the import
  35. configuration. Make sure to commit these to your version control system!
  36. .. image:: img/asset_workflow4.png
  37. Additionally, extra assets will be preset in the hidden res://.import folder:
  38. .. image:: img/asset_workflow5.png
  39. If any of the files present in this folder is erased (or the whole folder), the
  40. asset or assets will be reimported automatically. As such, committing this folder
  41. to the version control system is optional. It can save time on
  42. reimporting time when checking out in another computer, but it takes considerably
  43. more space and transfer time. Pick your poison!
  44. Changing import resource type
  45. -----------------------------
  46. Some source assets can be imported as different types of resources.
  47. For this, select the relevant type of resource desired and
  48. press "Reimport":
  49. .. image:: img/asset_workflow2.png
  50. Changing default import parameters
  51. -----------------------------------
  52. Different types of games might require different defaults.
  53. Changing the defaults per project can be achieved by using the
  54. "Preset.." Menu. Besides some resource types offering presets,
  55. the default setting can be saved and cleared too:
  56. .. image:: img/asset_workflow3.png
  57. Simplicity is key!
  58. ------------------
  59. This is a very simple workflow which should take very little time to get used to. It also enforces a more
  60. correct way to deal with resources.
  61. There are many types of assets available for import, so please continue reading to understand how to work
  62. with all of them!