public override void OnEnable() { var packageSources = AssetDatabase.FindAssets("t:PackageSource", new[] { "Assets", "Packages" }) .Select(AssetDatabase.GUIDToAssetPath) .Select(AssetDatabase.LoadAssetAtPath <PackageSource>) .ToArray(); Construct(packageSources); PackageSource.SourcesInitialized += PackageSource_SourceInitialized; PackageSource.LoadAllSources(); }
public override void OnEnable() { PackageSource.SourcesInitialized -= PackageSource_SourceInitialized; PackageSource.SourcesInitialized += PackageSource_SourceInitialized; PackageSource.LoadAllSources(); }
private void RefreshClicked() { PackageSource.LoadAllSources(); }
private static void Init() { PackageSource.SourcesInitialized -= PackageSource_SourceInitialized; PackageSource.SourcesInitialized += PackageSource_SourceInitialized; PackageSource.LoadAllSources(); }