From my limited understanding of how Godot handles importing, the .import
folder contains the data Godot actually uses in the game. This happens because many file formats are not necessarily optimized for use in Godot and by convert it, Godot can optimize the assets so they are as fast and high-quality as possible for use in the game engine.
The file_name_here.import
files, on the other hand, contain the information that tells Godot how to take the source file (like a .png
file) and convert it to data Godot actually uses in game (like a .stex
file). These are basically setting files, just for importing. When you press reimport
in the import tab in the Godot editor, it reads the data in these files and then replaces the asset in the .import
folder with the newly converted file.
(disclaimer: I am by no means an expert in this and most of this is speculation and educated guesses based on my game development and Godot experience. Please take what I wrote above with a grain of salt!)
However, this can sometimes have issues, like the file not being overriden correctly, the .import
file associated with the asset being corrupt, or the file in the .import
folder itself being corrupt. In these cases, it may not be a bad idea to delete the .import
folder (and potentially .import
files) if you are getting asset issues that otherwise just seem impossible to resolve. However, this does mean you will need to setup the import settings again, which depending on your project, may take some time.
What I would suggest doing is copying the .import
folder to a safe place before deleting it from the Godot project, as well as any other .import
files you plan to delete. Then you can see if deleting the folder (and files) resolves the issue, but if it does not, you can just move the copied folder (and files) back and everything should be exactly as it was prior to deletion.