
Anna Samson – What Unity .meta Files Actually Contain
Every Unity developer has seen them appear next to assets in the project folder. Those small files ending in .meta often go unnoticed until something breaks. Understanding what they contain and why they exist can save hours of debugging broken references and asset import issues.
What does a Unity .meta file actually contain?
A Unity .meta file is a YAML-style metadata document automatically generated for each asset and folder imported into the project’s Assets directory, as described in the Unity Manual on Asset Metadata. Unity stores it in the same location as the asset file, and the two are associated by filename.
The file serves three primary purposes: assigning a persistent GUID to the asset, storing import settings so Unity can recreate the imported artifact consistently, and keeping references intact when files are moved or renamed.
4-item overview of a .meta file
- Container format: YAML-style key-value pairs
- Location: Same directory as the asset it describes
- Generated: Automatically when an asset enters the project
- Required for: GUID assignment, import settings, reference stability
Key insights about .meta files
- The
.metafile is the source of truth for asset identity in Unity - GUIDs are what Unity references internally, not filenames or paths
- Import settings for textures, models, audio, and other assets live in the
.metafile - Deleting or regenerating a
.metafile changes the asset’s identity and can break references - The file must be committed to version control alongside the asset to preserve references
- For scripts, the
.metafile matters because the script’s GUID is what other assets reference - Moving an asset without its
.metafile can cause Unity to treat it as a different asset
Core fields of a .meta file
| Field | Purpose | Common value |
|---|---|---|
fileFormatVersion |
Schema version of the metadata file | 2 |
guid |
32-character hexadecimal unique identifier | Varies per asset |
userData |
Custom field available for user data | Often empty |
importerType |
Type of importer used for this asset | Varies (TextScriptImporter, etc.) |
assetBundleName |
Asset bundle assignment name | Often empty |
assetBundleVariant |
Variant of the assigned asset bundle | Often empty |
externalObjects |
References to external assets | Varies |
| Importer-specific fields | Settings for the asset type | Varies by type |
How does the GUID inside a .meta file work?
The GUID is a 128-bit identifier represented as 32 hexadecimal characters. Unity creates a new random GUID for each file and stores it in that file’s .meta companion, according to Unity’s documentation on direct asset references. That GUID is what Unity uses to reference the asset internally, not the filename or path.
Why GUIDs matter for asset references
Unity’s asset serialization uses a File GUID and a Local ID. The GUID identifies the asset file, and the Local ID identifies an object inside that asset file. This system is explained in Unity’s tutorial on Assets, Resources and AssetBundles.
If the .meta file stays with the asset during a rename or move, the GUID remains the same. This stability is what allows Unity to keep scene references, prefab links, and script bindings intact across file operations.
GUID stability across operations
- Stable across rename and move: The GUID persists as long as the
.metafile accompanies the asset - Required for serialized references: References store the file GUID plus a local object identifier
- Version-control sensitive: The
.metafile must be committed with the asset to preserve references across team members - Changing the GUID breaks links: Deleting the
.metaforces Unity to generate a new GUID, breaking all existing references
Deleting or regenerating a .meta file changes the asset’s identity and can break references in scenes, prefabs, and scripts. Moving an asset without its .meta file can cause Unity to treat it as a completely different asset.
What import settings are stored in the .meta file?
Unity stores the settings you see in the Inspector for imported assets directly in the .meta file. These settings vary by asset type and importer, as documented in Unity’s explanation of what happens behind the scenes.
Common import settings stored per asset type
For textures, the .meta file records Texture Type, Wrap Mode, Filter Mode, Aniso Level, compression settings, and sprite mode. For models, it stores model scale and related import parameters. For audio files, it holds audio quality and compression settings. If you change any of these import settings in the Inspector, Unity writes those changes back into the .meta file and reimports the asset using the new configuration.
TextScriptImporter for script files
For Unity script files such as .cs, the .meta file is still created and still contains a GUID. The TextScriptImporter is the importer Unity uses for text-based scripts in the asset pipeline. According to an analysis of Unity GUID behavior, the commonly cited fileID for a MonoBehaviour script reference is 11500000.
The exact importer fields for scripts are not uniformly documented, but the general rule is that the importer type and settings are serialized in the .meta file alongside the GUID and other metadata, as described in the Uninomicon guide to metafiles.
Even for text-based assets like scripts, the .meta file is essential. The script’s GUID is what other assets reference when they bind to that script class. Without the .meta file, those references become orphaned.
How does Unity use .meta files in asset management?
Unity’s asset pipeline uses .meta files as part of the Asset Database workflow, as outlined in the Asset Database documentation. The metadata file lets Unity connect the original source asset with its imported artifact in the database using the GUID and import settings.
Four core functions of .meta files in the pipeline
- Asset tracking: Keeping track of assets across file moves and renames
- Incremental reimport: Deciding whether to reimport based on source metadata and file state
- Stable direct references: Maintaining links between scenes, prefabs, scripts, textures, materials, and other assets
- Import reproducibility: Regenerating the library artifact from source plus metadata
Timeline: How .meta files evolved in Unity’s asset system
- Early Unity versions: Unity introduces
.metafiles as sidecar metadata for asset GUID assignment and import settings - Asset pipeline maturity: The Asset Database workflow incorporates
.metafiles for incremental reimport and reference stability - Version control integration: Best practices emerge requiring
.metafiles to be committed alongside assets in version control systems - TextScriptImporter standardization: Script
.metafiles become part of the same metadata-and-import workflow as other imported assets - Modern Unity (6000.x): Documentation continues to emphasize that
.metafiles are the source of truth for asset identity, with GUIDs as the primary reference mechanism
What is clearly established and what remains uncertain about .meta files?
Established information
.metafiles are automatically generated for each asset in theAssetsdirectory- They store the GUID and import settings for the associated asset
- The GUID is a 128-bit identifier represented as 32 hexadecimal characters
- Deleting or regenerating a
.metafile changes the asset’s identity - The file must be committed to version control alongside the asset
- For scripts, the
.metafile contains a GUID that other assets reference
Information that remains unclear
- The exact full schema of all possible fields across all importer types is not provided in the available documentation
- The specific fields inside
TextScriptImporterfor script.metafiles are not detailed in the provided research - The complete list of conditions that trigger automatic
.metafile regeneration is not fully enumerated
What is the background and meaning of .meta files in practice?
The .meta file format is a small YAML-style metadata document that Unity uses as a sidecar companion to every asset in the project. It was designed to solve a fundamental problem: how to maintain stable references to assets when files are moved, renamed, or shared across a team.
According to a developer’s perspective on meta files, the GUID-based system means Unity relies on the identifier stored in the .meta file rather than the filename or file path. This design choice makes asset references resilient to organizational changes but also creates a dependency: if the .meta file is lost or altered, the references break.
In version control workflows, .meta files are essential for keeping scenes, prefabs, and scripts linked correctly across different team members’ environments. The Unity gitignore guidance emphasizes that these files must be tracked and committed.
What do official sources and developers say about .meta files?
Unity’s official documentation states clearly that the .meta file contains the unique ID assigned to the asset and the asset’s import settings. The documentation available across Unity 2023.1, 6000.0, 6000.1, and 6000.3 versions consistently describes this role.
The .meta file contains the unique ID assigned to the asset and the asset’s import settings.
— Unity Manual on Asset Metadata
If the .meta file stays with the asset, the GUID remains the same.
— DeepWiki analysis of Unity metadata files
.meta files are the source of truth for asset identity in Unity.
— Unity documentation on direct asset references
What is the most important thing to remember about .meta files?
The .meta file is not an optional extra. It is the source of truth for asset identity in Unity. The GUID inside the file is what Unity references, not the filename or path. Import settings live in the .meta file and drive how Unity imports each asset. For scripts, the .meta file still matters because the script’s GUID is what other assets reference.
For a broader look at how different entertainment and media professionals manage their digital workflows, you may find the Piper Perabo Movies and TV Shows – Full List & Biography 2025 article insightful. Additionally, the Sandra Oh – Biography, Age, Husband, and Net Worth piece offers another perspective on how public figures navigate their careers.
Frequently asked questions about Unity .meta files
Can I delete a .meta file safely?
No. Deleting a .meta file forces Unity to generate a new GUID for the asset, which breaks all existing references in scenes, prefabs, and scripts.
What happens if I move an asset without its .meta file?
Unity may treat it as a completely different asset. The original references remain pointed at the old GUID, causing broken links.
Should I commit .meta files to version control?
Yes. They must be committed with the asset to preserve GUID references across team members and environments.
Do script files also have .meta files?
Yes. Unity creates a .meta file for every .cs or other script file, and the GUID inside is what other assets reference when binding to that script.
What is the fileFormatVersion field?
It indicates the schema version of the metadata file. In many Unity versions, this is commonly set to 2.
Can I edit a .meta file manually?
Yes, you can edit it in a text editor, but doing so incorrectly can break asset references or import behavior. It is generally safer to change import settings through the Unity Inspector.
What does the userData field do?
It is a custom field available for user data. In practice, it is often left empty.
Does the GUID change if I rename the asset?
No. If the .meta file stays with the asset, the GUID remains the same regardless of filename changes.
What is the relationship between GUID and Local ID?
The GUID identifies the asset file, while the Local ID identifies a specific object inside that asset file, such as a mesh or material within a model.
Why does Unity use GUIDs instead of file paths?
GUIDs remain stable across file renames, moves, and version control operations, while file paths are brittle and can break easily.