Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


fileExtensions

The list of file name extensions that this scripted importer should handle. You must not include the period character, only the extension characters such as "ext".
Read time 1 minuteLast updated 13 days ago

Definition

public string[] fileExtensions { get; }

Remarks

By specifying one or more extensions in this list, your ScriptedImporter becomes the default importer for each of those types of asset files. The file name extension list is case insensitive. Unity will match files with any variations of casing for the extensions you specify. Note: Do not assign the same file name extension to more than one ScriptedImporter. If you do, an error message is thrown, and files with that file name extension will not be imported by any ScriptedImporter. Note: You cannot override Unity's built-in default importers. For example, if you include ".prefab" in your file name extension list, it will be ignored because it is a built-in default importer type.

Examples

using UnityEngine;using UnityEditor.AssetImporters;[ScriptedImporter(1, new[] {"cb", "cube"})]public class CubeImporter : ScriptedImporter{ public override void OnImportAsset(AssetImportContext ctx) { // ... }}