# ProduceArtifact(ArtifactKey)

> Imports an Asset using an Importer type or returns a matching cached result.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.Experimental](/engine/6000.7/script-reference/unityeditor/experimental.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
public static ImportResultID ProduceArtifact(ArtifactKey artifactKey)
```

### Parameters

**** (\[ArtifactKey]\(/engine/6000.7/script-reference/unityeditor/experimental/artifactkey)): ArtifactKey specifying what artifact to produce with which importer class.

### Returns

| Type                                                                                         | Description                                                                   |
| -------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| [ImportResultID](/engine/6000.7/script-reference/unityeditor/experimental/importresultid.md) | Unique identifier for the artifact produced from the specified `artifactKey`. |

### Remarks

Reuses an existing cached import result if one exists for `artifactKey`.

This method returns an invalid [ImportResultID](/engine/6000.7/script-reference/unityeditor/experimental/importresultid.md) in the following curcumstances:

1. An internal error occurs. This is accompanied by an error message in the Unity Log.
2. `artifactKey` contains an invalid Asset reference, or an invalid Importer type.

Use [AssetDatabaseExperimental.ForceProduceArtifact](/engine/6000.7/script-reference/unityeditor/experimental/assetdatabaseexperimental/forceproduceartifact.md) where it is not appropriate to use a cached result.
