using System.Reflection;
using UnityEditor;
using UnityEngine;
public static class Example
{
[MenuItem( "Tools/Hoge" )]
public static void Repaint()
{
const BindingFlags attr = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic;
const string assemblyName = "Unity.Addressables.Editor";
const string windowTypeName = "UnityEditor.AddressableAssets.GUI.AddressableAssetsWindow";
const string groupEditorTypeName = "UnityEditor.AddressableAssets.GUI.AddressableAssetsSettingsGroupEditor";
var assembly = Assembly.Load( assemblyName );
var windowType = assembly.GetType( windowTypeName );
var windows = Resources.FindObjectsOfTypeAll( windowType );
var isOpen = 1 <= windows.Length;
if ( !isOpen ) return;
var window = windows[ 0 ] as EditorWindow;
var groupEditorType = assembly.GetType( groupEditorTypeName );
var groupEditorField = windowType.GetField( "m_GroupEditor", attr );
var method = groupEditorType.GetMethod( "Reload", attr );
var groupEditor = groupEditorField.GetValue( window );
method.Invoke( groupEditor, new object[0] );
window.Repaint();
}
}