ScriptedImporterAttribute
Class attribute used to register a custom asset importer derived from ScriptedImporter with Unity's Asset import pipeline.
Read time 4 minutesLast updated 10 days ago
Definition
- Type: Class
- Namespace: UnityEditor.AssetImporters
- Assembly: UnityEditor.CoreModule
- Inherits from: Attribute
[AttributeUsage(AttributeTargets.Class, Inherited = false)]public class ScriptedImporterAttribute : Attribute
Examples
using UnityEngine;using UnityEditor.AssetImporters;[ScriptedImporter(version: 1, ext: "sphere", AllowCaching = true)]public class SphereImporter : ScriptedImporter{ public override void OnImportAsset(AssetImportContext ctx) { // ... }}
Fields
Value | Description |
|---|---|
| AllowCaching | Enable cache server uploads and downloads. |
Constructors
Constructor | Description |
|---|---|
| ScriptedImporterAttribute(System.Int32,System.String) | Use the ScriptedImporter attribute to register a custom importer derived from ScriptedImporter with Unity's Asset import pipeline. |
| ScriptedImporterAttribute(System.Int32,System.String,System.Int32) | Use the ScriptedImporter attribute to register a custom importer derived from ScriptedImporter with Unity's Asset import pipeline. |
| ScriptedImporterAttribute(System.Int32,System.String[]) | Use the ScriptedImporter attribute to register a custom importer derived from ScriptedImporter with Unity's Asset import pipeline. |
| ScriptedImporterAttribute(System.Int32,System.String[],System.Int32) | Use the ScriptedImporter attribute to register a custom importer derived from ScriptedImporter with Unity's Asset import pipeline. |
| ScriptedImporterAttribute(System.Int32,System.String[],System.String[]) | Use the ScriptedImporter attribute to register a custom importer derived from ScriptedImporter with Unity's Asset import pipeline. |
| ScriptedImporterAttribute(System.Int32,System.String[],System.String[],System.Int32) | Use the ScriptedImporter attribute to register a custom importer derived from ScriptedImporter with Unity's Asset import pipeline. |
Properties
Property | Description |
|---|---|
| fileExtensions | The list of file name extensions that this scripted importer should handle. |
| importQueuePriority | Enables controlling the ordering of asset import based on type. Positive values delay the processing of source asset files while negative values place them earlier in the import process. |
| overrideFileExtensions | List of file name extensions (not including the leading period character) that the scripted importer can handle in addition to the default file name extension(s). |
| version | Importer version number used by the import layer to detect a new version of the importer. |