Version: 2022.2
言語: 日本語
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) { // ... } }
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961