private static AssetDeleteResult OnWillDeleteAsset(string path, RemoveAssetOptions options) { var identity = SmartNetIdentityManager.GetIdentity(path); if (identity != null) { EditorApplication.delayCall += () => { SmartNetIdentityManager.Remove(identity); }; } return(AssetDeleteResult.DidNotDelete); }
private static string[] OnWillSaveAssets(string[] paths) { EditorApplication.delayCall += () => { foreach (var path in paths) { SmartNetIdentityManager.Add(path); } IdentityLibrary.RemoveNullReferences(); }; return(paths); }
private static AssetMoveResult OnWillMoveAsset(string fromPath, string toPath) { if (SmartNetIdentityManager.LastKnownPath == fromPath) { SmartNetIdentityManager.SetLastKnownPath(toPath); } EditorApplication.delayCall += () => { SmartNetIdentityManager.Add(fromPath); SmartNetIdentityManager.Add(toPath); }; return(AssetMoveResult.DidNotMove); }
private static void OnWillCreateAsset(string assetPath) { EditorApplication.delayCall += () => { SmartNetIdentityManager.Add(assetPath); }; }