static void OnSceneLoading(string path, OpenSceneMode mode) { Debug.Log("OnSceneLoading " + path + " " + mode); if (!FileModifiedChecker.CanEditFile(path)) { string message = "ERROR can't edit file " + path + " since it's currently not editable and might be locked. Further edits might be lost"; Debug.LogError(message); ShowPopup.Init(message); } }
public static string[] OnWillSaveAssets(string[] paths) { List <string> tmp = new List <string>(); foreach (var path in paths) { if (CanEditFile(path)) { tmp.Add(path); } else { string message = "file " + path + "can't be saved since it's read only, please unlock it to edit it"; Debug.LogError(message); ShowPopup.Init(message); } } return(tmp.ToArray()); }