public override void OnInspectorGUI() { base.OnInspectorGUI(); if (!AddressableInspectorUtils.CheckMaybeAddressableAsset(targetAssetPath)) { return; } GUI.enabled = true; if (dispatcherConfig == null) { DrawCreateAssetBundleDispatcher(); } else { DrawAssetBundleDispatcherInspector(); } }
void Initialize() { configChanged = false; filterType = AddressableDispatcherFilterType.Root; targetAssetPath = AssetDatabase.GetAssetPath(target); if (!AssetBundleUtility.IsPackagePath(targetAssetPath)) { return; } packagePath = AssetBundleUtility.AssetsPathToPackagePath(targetAssetPath); databaseAssetPath = AddressableInspectorUtils.AssetPathToDatabasePath(targetAssetPath); dispatcherConfig = AssetDatabase.LoadAssetAtPath <AddressableDispatcherConfig>(databaseAssetPath); if (dispatcherConfig != null) { dispatcherConfig.Load(); filterType = dispatcherConfig.Type; } }