public static void LoadSelectedConfig() { var go = Selection.activeGameObject; if (!go) { return; } var cfg = go.GetComponent <ConfigBase>(); if (!cfg) { return; } ConfigSystem.TryLoadSingle(cfg); }