Version: 2022.3
言語: 日本語

説明

This is called by Unity when it is about to write serialized assets or Scene files to disk.

実装されている場合、配列を返すことで書き込まれるファイルを上書きできます。 Unity によってパスされたパス名のサブセットを含みます。この関数は静的です。

using UnityEngine;
using UnityEditor;
using System.Collections;

public class FileModificationWarning : AssetModificationProcessor { static string[] OnWillSaveAssets(string[] paths) { Debug.Log("OnWillSaveAssets"); foreach (string path in paths) Debug.Log(path); return paths; } }