Skip to content

Commit 36643ec

Browse files
committed
自動パス生成時に間を開けるように修正
1 parent e4a11ee commit 36643ec

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

Assets/AudioManager_KanKikuchi/Editor/AudioPathCreator.cs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,15 @@ private static void OnPostprocessAllAssets(string[] importedAssets, string[] del
3232
importedAssets, deletedAssets, movedAssets, movedFromAssetPaths
3333
};
3434

35-
if (ExistsPathInAssets(assetsList, BGM_DIRECTORY_PATH)) {
36-
CreateBGMPath();
37-
}
38-
39-
if (ExistsPathInAssets(assetsList, SE_DIRECTORY_PATH)) {
40-
CreateSEPath();
41-
}
35+
//すぐにResources.LoadAllで取得出来ない場合もあるので間を開けて実行
36+
EditorApplication.delayCall += () => {
37+
if (ExistsPathInAssets(assetsList, BGM_DIRECTORY_PATH)) {
38+
CreateBGMPath();
39+
}
40+
if (ExistsPathInAssets(assetsList, SE_DIRECTORY_PATH)) {
41+
CreateSEPath();
42+
}
43+
};
4244
}
4345

4446
//入力されたassetsのパスの中に、指定したパスが含まれるものが一つでもあるか

0 commit comments

Comments
 (0)