MetaProcessor
Post-processor that strips AssetOrigin metadata blocks from .meta files of locally imported packages. This removes Asset Store origin tracking from assets that have been re-imported as local packages.
Definition
Namespace: Paragon.Editor.ThirdPartyPackageImporter Assembly: Paragon.Editor.dll
internal class MetaProcessor : ProcessorInherits: Processor
Remarks
When Unity imports assets from the Asset Store, it adds an AssetOrigin section to each .meta file tracking the package source. For local packages (re-imported from a local .unitypackage), this tracking is incorrect and should be removed to prevent Unity from associating the assets with the wrong source.
Regex Pattern
The processor uses a compiled regex to match and remove AssetOrigin blocks:
AssetOrigin:.*(?:\r?\n {2}.*)*(\r?\n)?This matches:
The
AssetOrigin:header lineAny continuation lines indented with 2 spaces
The trailing newline
Item Filtering
Only processes local packages — returns empty for non-local packages (opposite of FBX/Material processors)
Filters to non-folder items — all file types, not just specific extensions
File-level operation — appends
.metato the destination path
Write Encoding
Modified files are written with UTF-8 without BOM (new UTF8Encoding(encoderShouldEmitUTF8Identifier: false)), matching Unity's .meta file convention.
Quick Lookup
What it strips
AssetOrigin: block and all indented sub-properties
When it runs
Only for local packages (IsLocalPackage == true)
File modified
{destinationAssetPath}.meta
Fields
regex
Regex
private readonly
Compiled regex matching AssetOrigin: blocks with indented continuation lines
Methods
OnProcess (protected override)
Returns all non-folder items for local packages. Returns empty for remote packages.
OnProcessItem (protected override)
Reads the .meta file for the item, strips AssetOrigin blocks via regex, and writes back only if the content changed.
Common Pitfalls
Only processes local packages Unlike the other PostProcessors (FBX, Material) which skip local packages, MetaProcessor only processes local packages. This is the inverse behavior — make sure to understand this distinction.
Meta file must exist If the .meta file doesn't exist (e.g., the asset hasn't been imported yet), the processor silently skips the item. No error is logged.
Regex depends on indentation format The regex expects AssetOrigin sub-properties to be indented with exactly 2 spaces. If Unity changes its .meta file format (e.g., using tabs or different indentation), the regex will not match.
Examples
Before Processing
After Processing
See Also
PostProcessors Overview — post-processor subsystem
FBXProcessor — FBX node renaming
MaterialProcessor — material URP upgrade
Last updated