Asset Extension
When Force imports assets, it also stores additional data about the asset, such as what import settings Force should use to import the asset, and where the asset is used throughout your project. Below is a description of how this process works (Also i want to say i do similar Asset System as Unity does):
When Force imports an asset, it first generates a special UID (unique identifier) for it so that it is unique. We will talk about uniqueness and these subtleties later.
Then, when the UID has been attached to the asset, Force creates a special hidden extension file (.ext) in which additional information about the imported asset is stored.
The asset is being loaded and finish import.
When you change or delete or perform some operation with an asset, Force will re-import it. When Force re-import asset you can see that on top of editor taskbar or in Status Bar.
UID (Unique ID's)
Force periodically checks the Assets folder and checks if there have been any changes there. When you add a new file or folder to the Assets folder, Force notices this and if he didn't know anything about this asset, then he will import it.
And if it is a new asset, Force generates a unique identifier for it. At the moment it is a 64 bit binary number. These identifiers are not displayed in the editor.
Asset UID Rules
This chapter for advanced users.
All assets should not have identical UID, because that break asset and made unusable another with same UID.
Problem: Basically you never can get second asset with same UID. And problem is that, when Force Asset Manager search assets, it search it by UID. And UID is Unique Identifier of that asset, so when Asset Manager finds the first asset with this UID, it just gets its back, and made actions with it. But what if we want second asset with this UID, because it has different path on disk or type? This never gonna happen, because we already find the asset by UID and get it back, and we can never get to second version of itself. Only if write overcomplicated code that not be making any seans at all plus will slow that asset system. In other words its just break the assets and actually definition of UID in general.
Asset physical file and .ext file should always be placed in one folder. If not this asset be broken and displayed with different icon.
Conclusion: In no case do not duplicate or copy assets from other projects if they have the same UID!
Extension Files
This picture shows roughly how Force imports assets, namely creates .ext files for regular files and folders. Asset extension files are hidden in the Assets Browser and OS Explorer and you can't see them, but you can enable the display of hidden system files in your OS.
However, these .ext files are not visible in the Browser because they are hidden by default. To make them visible, open the Preferences -> Editor -> Hide Asset Extensions Files setting and enable it.
As i said early (section 2) when Force creates a .ext file for an asset, it writes the asset’s UID inside the .ext file and stores the .ext file in the same location as the asset file.
The .ext files contain the unique UID assigned to the asset, and values for all the import options you see in the Inspector window when you select an asset in your Assets Browser. For example, for a Texture, this includes the Texture Type, Wrap Mode, Filter Mode and import options.
Extension files and Physical asset files
If you move or rename an asset within Force own Browser, Force also automatically moves or renames the corresponding .ext file. However, if you move or rename an asset outside of Force (that is, in Windows Explorer), you must move or rename the .ext file to match. Otherwise you break the asset.
If an asset loses its physical file (for example you delete it physical file outside the Force, but forgot to delete its .ext file) Force marks this asset as broken and will display it with different icon. This asset still be exist in Global Asset Database but you cannot attach it to components, and it will be only visible if you enable displaying the .ext files in HELP -> Preferences -> Hide Asset Extension Files. In this case only what you can do its restore it, if you manually delete it, if you dont know reason of it, just delete it.
If an asset loses its extension file (for example, if you move or rename the asset outside of Force, but don’t move or rename the corresponding .ext file), any reference to that asset is broken in your project. In this situation, Force notices that the asset does not have a corresponding extension file, generates a new one for the moved/renamed asset as if it is a brand new asset.
This process can cause significant problems in your project. And break the asset that stores in Global Asset Database. If asset is broken, Force will hold it in Asset Global Database, but you cannot access to it and use it in you project. And if the break asset will already assign to some component you need to manually reassign the asset that witch created as brand new one.
For now Force will have store the broken assets in Asset Global Database, but as i said early you can not access to them. In next updates for Asset System this situation will definitely holds currently.
Last updated