Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


ProduceArtifact(ArtifactKey)

Imports an Asset using an Importer type or returns a matching cached result.
Read time 1 minuteLast updated 12 days ago

Definition

public static ImportResultID ProduceArtifact(ArtifactKey artifactKey)

Parameters

artifactKey

ArtifactKey specifying what artifact to produce with which importer class.

Returns

Type

Description

ImportResultIDUnique 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 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 where it is not appropriate to use a cached result.