文档

Unity Engine

Download Unity

Unity Engine

MakeEditable(string[], string, List<string>)

Unity calls this method when one or more files need to be opened for editing.
阅读时间1 分钟最后更新于 6 天前

Definition

MakeEditable()

public void MakeEditable(string[] paths, string prompt, List<string> outNotEditablePaths)

Parameters

Specifies an array of file paths relative to the project root.

prompt

Dialog prompt to show to the user, if a version control operation needs to be done. If
null
(default), no prompt is shown.

outNotEditablePaths

List<string>
Output list of file paths that could not be made editable.

Remarks

It must be static if implemented. Additional Resources: AssetDatabase.MakeEditable.

Examples

using System.Collections.Generic;using UnityEngine;class CustomAssetModificationProcessor : UnityEditor.AssetModificationProcessor{ static bool MakeEditable(string[] paths, string prompt, List<string> outNotEditablePaths) { Debug.Log("MakeEditable:"); foreach (var path in paths) Debug.Log(path); return true; }}