mirror of
https://github.com/DCFApixels/DragonECS-Unity.git
synced 2025-09-18 01:54:35 +08:00
fix asset processor
This commit is contained in:
parent
22747a4a22
commit
789a16ab29
@ -20,31 +20,24 @@ namespace DCFApixels.DragonECS.Unity.Editors
|
|||||||
|
|
||||||
foreach (string str in importedAssets)
|
foreach (string str in importedAssets)
|
||||||
{
|
{
|
||||||
//Debug.Log("Reimported Asset: " + str);
|
|
||||||
ProcessAssetPath(str);
|
ProcessAssetPath(str);
|
||||||
}
|
}
|
||||||
foreach (string str in deletedAssets)
|
foreach (string str in deletedAssets)
|
||||||
{
|
{
|
||||||
//Debug.Log("Deleted Asset: " + str);
|
|
||||||
RemoveAssetPath(str);
|
RemoveAssetPath(str);
|
||||||
}
|
}
|
||||||
|
foreach (var str in movedFromAssetPaths)
|
||||||
for (int i = 0; i < movedFromAssetPaths.Length; i++)
|
|
||||||
{
|
{
|
||||||
RemoveAssetPath(movedFromAssetPaths[i]);
|
RemoveAssetPath(str);
|
||||||
}
|
}
|
||||||
for (int i = 0; i < movedAssets.Length; i++)
|
foreach (string str in movedAssets)
|
||||||
{
|
{
|
||||||
//Debug.Log("Moved Asset: " + movedAssets[i] + " from: " + movedFromAssetPaths[i]);
|
ProcessAssetPath(str);
|
||||||
ProcessAssetPath(movedAssets[i]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//if (didDomainReload)
|
//if (didDomainReload)
|
||||||
//{
|
//{
|
||||||
// Debug.Log("Domain has been reloaded");
|
// Debug.Log("Domain has been reloaded");
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
|
||||||
_timeTicks = DateTime.Now.Ticks;
|
_timeTicks = DateTime.Now.Ticks;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -63,16 +56,12 @@ namespace DCFApixels.DragonECS.Unity.Editors
|
|||||||
private static void RemoveAssetPath(string filePath)
|
private static void RemoveAssetPath(string filePath)
|
||||||
{
|
{
|
||||||
if (IsScript(filePath) == false) { return; }
|
if (IsScript(filePath) == false) { return; }
|
||||||
//Debug.Log("RemoveAssetPath: " + filePath);
|
|
||||||
_removedScriptGuids.Add(filePath);
|
_removedScriptGuids.Add(filePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void ProcessAssetPath(string filePath)
|
private static void ProcessAssetPath(string filePath)
|
||||||
{
|
{
|
||||||
if (IsScript(filePath) == false) { return; }
|
if (IsScript(filePath) == false) { return; }
|
||||||
//Debug.Log("ProcessAssetPath: " + filePath);
|
|
||||||
|
|
||||||
var script = AssetDatabase.LoadAssetAtPath<MonoScript>(filePath).text;
|
|
||||||
_newScriptIDs.Add(filePath);
|
_newScriptIDs.Add(filePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user