# SetOutputArtifactFile(string, string)

> Sets the data to be written to the artifact file with the given extension, by reading it from the file at the supplied path.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.AssetImporters](/engine/6000.5/script-reference/unityeditor/assetimporters.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
public void SetOutputArtifactFile(string extension, string path)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The extension of the artifact associated with this data.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The path to the file containing the artifact data.

### Remarks

An artifact is part of the result of an importer and can contain any data that isn't a UnityEngine.Object.

Multiple artifact file extensions can be used to create multiple artifact files.

The empty and 'info' artifact extensions are reserved by Unity. An empty extension is used for the main artifact, and 'info' is used for the preview data of the imported main object.

For more information on how artifact files work, refer to [Contents of the Asset Database](/engine/6000.5/manual/assets-and-media/asset-database/contents.md) documentation.

See also [AssetImportContext.SetOutputArtifactData](/engine/6000.5/script-reference/unityeditor/assetimporters/assetimportcontext/setoutputartifactdata.md) for an alternative method to supply data directly without using a file.
