Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


OnWillSaveAssets(string[])

This is called by Unity when it is about to write serialized assets or Scene files to disk.
Read time 1 minuteLast updated 4 days ago

Definition

OnWillSaveAssets()

public void OnWillSaveAssets(string[] arg0)

Parameters

arg0

string[]

Remarks

If it is implemented, it allows you to override which files are written by returning an array containing a subset of the pathnames which have been passed by Unity. Note that this function is static.

Examples

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; }}