Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


ForceProduceArtifact(ArtifactKey)

Imports an Asset using an Importer type.
Read time 1 minuteLast updated 10 days ago

Definition

public static ImportResultID ForceProduceArtifact(ArtifactKey artifactKey)

Parameters

artifactKey

ArtifactKey specifying which Asset to produce with which Importer type.

Returns

Type

Description

ImportResultIDUnique identifier for the result produced using the specified
artifactKey
.

Remarks

Always imports an Asset using an Importer type, both of which are specified in
artifactKey
. Never reuses an existing cached import result.
This 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.