feat: Enhance Addressable tools with improved scanning and filtering features
- Updated AddressReferenceGraphWindow to scan for AddressKeys in the _Game directory and added a warning for missing directories. - Enhanced AddressableBatchTool with new filters for asset types (Prefab, Scene, ScriptableObject, Texture, Audio) and improved UI layout for better usability. - Introduced automatic application of grouping and labeling rules during registration in AddressableBatchTool. - Added functionality to quickly scan the _Game folder and improved address building logic. - Updated AddressableRuleSyncWindow to include handling for custom labels and improved reporting of issues. - Enhanced AddressableRules with a whitelist for known labels and refined grouping and labeling logic based on asset prefixes.
This commit is contained in:
@@ -200,11 +200,15 @@ namespace BaseGames.Editor
|
||||
foreach (var kv in keyDict)
|
||||
kv.Value.ExistsInAddressables = registeredAddressValues.Contains(kv.Value.Value);
|
||||
|
||||
// 3. 扫描 .cs 文件引用
|
||||
var csFiles = Directory.GetFiles(
|
||||
Path.Combine(Application.dataPath, "Scripts"),
|
||||
"*.cs",
|
||||
SearchOption.AllDirectories);
|
||||
// 3. 扫描 _Game/ 下所有 .cs 文件中对 AddressKeys 的引用
|
||||
string gameDir = Path.Combine(Application.dataPath, "_Game");
|
||||
if (!Directory.Exists(gameDir))
|
||||
{
|
||||
Debug.LogWarning($"[AddressReferenceGraph] 未找到游戏目录:{gameDir}");
|
||||
foreach (var kv in keyDict) _entries.Add(kv.Value);
|
||||
return;
|
||||
}
|
||||
var csFiles = Directory.GetFiles(gameDir, "*.cs", SearchOption.AllDirectories);
|
||||
|
||||
foreach (var file in csFiles)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user