Version: 2022.1
言語: 日本語
public string[] 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".

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.

using UnityEngine;
using UnityEditor.AssetImporters;

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