【m】修复每次编译后拷贝打包资源需要点两下才生效的问题
This commit is contained in:
@@ -14,11 +14,18 @@ public static class StreamingAssetsFilter
|
||||
public static int callbackOrder => 0; // 执行优先级
|
||||
// 要删除的文件后缀列表
|
||||
private const string extensionsToDelete = ".meta";
|
||||
|
||||
private static void TryInit()
|
||||
{
|
||||
if(string.IsNullOrEmpty(streamingAssetsPath))
|
||||
streamingAssetsPath = Application.dataPath + "/StreamingAssets";
|
||||
if(string.IsNullOrEmpty(tempBackupPath))
|
||||
tempBackupPath = Application.dataPath + "/../StreamingAssets_Backup";
|
||||
}
|
||||
|
||||
public static void OnPreprocessBuild()
|
||||
{
|
||||
|
||||
streamingAssetsPath = Application.dataPath + "/StreamingAssets";
|
||||
tempBackupPath = Application.dataPath + "/../StreamingAssets_Backup";
|
||||
TryInit();
|
||||
|
||||
if (!Directory.Exists(streamingAssetsPath)) return;
|
||||
|
||||
@@ -55,6 +62,7 @@ public static class StreamingAssetsFilter
|
||||
|
||||
public static void OnPostprocessBuild()
|
||||
{
|
||||
TryInit();
|
||||
|
||||
if (!Directory.Exists(tempBackupPath)) return;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "com.staryevo.tools",
|
||||
"version": "1.3.35",
|
||||
"version": "1.3.36",
|
||||
"displayName": "00.StaryEvo.Tools",
|
||||
"description": "This is an Framework package(后台服务器版本,端口9527)",
|
||||
"unity": "2021.3",
|
||||
|
||||
Reference in New Issue
Block a user