Add main mesh fixes

This commit is contained in:
Toomas Tamm
2021-02-23 02:13:14 +02:00
parent c89f326c37
commit 989424e659
139 changed files with 8101 additions and 2033 deletions

View File

@@ -0,0 +1,23 @@
using UnityEditor;
namespace Asset_Cleaner {
class ProcessAllAssets : AssetPostprocessor {
static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths) {
if (!AufCtx.InitStarted) return;
if (!Globals<BacklinkStore>.Value.Initialized) return;
var store = Globals<BacklinkStore>.Value;
var length = movedAssets.Length;
for (var i = 0; i < length; i++)
store.Replace(movedFromAssetPaths[i], movedAssets[i]);
foreach (var path in deletedAssets)
store.Remove(path);
foreach (var path in importedAssets)
store.RebuildFor(path, true);
store.UpdateUnusedAssets();
}
}
}