import_process.rst 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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 maintainance
  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 exporer).
  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. Just select in the filesystem dock the relevant resource:
  21. .. image:: /img/asset_workflow1.png
  22. And, after adjusting the parameters, just 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 source asset changes, Godot will perform and automatic reimport
  30. of it, applying the preset configured for that specific asset.
  31. Files generated
  32. -----------------
  33. Importing will add an extra <asset>.import file, containing the import
  34. configuration. Make sure to commit these to your version control system!
  35. .. image:: /img/asset_workflow4.png
  36. Additionally, extra assets will be presset in the hidden res://.import folder:
  37. .. image:: /img/asset_workflow5.png
  38. If any of the files present in this folder is erased (or the whole folder), the
  39. asset or asssets will be reimported automatically. As such, Commiting this folder
  40. to the version control system is optional. It can save time on
  41. reimporting time when checking out in another computer, but it takes considerably
  42. more space and transfer time. Pick your poison!
  43. Changing import resource type
  44. -----------------------------
  45. Some source assets can be imported as different types of resources.
  46. For this, just select the relevant type of resource desired and
  47. press "Reimport":
  48. .. image:: /img/asset_workflow2.png
  49. Changing default import parameters
  50. -----------------------------------
  51. Different types of games might require different defaults.
  52. Changing the defaults per project can be achieved by using the
  53. "Preset.." Menu. Besides some resource types offering presets,
  54. the default setting can be saved and cleared too:
  55. .. image:: /img/asset_workflow3.png
  56. Simplicity is key!
  57. ------------------
  58. This is a very simple workflow which should take very little time to get used to. It also enforces a more
  59. correct way to deal with resources.
  60. There are many types of assets available for import, so please continue reading to understand how to work
  61. with all of them!