CogAbility: Add open asset button on effect and abilities context menu

This commit is contained in:
Arnaud Jamin
2025-01-16 07:56:28 -05:00
parent 24cc2971c8
commit d7ab3f18b9
9 changed files with 153 additions and 34 deletions
@@ -18,19 +18,7 @@ void FCogEngineHelper::ActorContextMenu(AActor& Actor)
FCogWindowWidgets::ThinSeparatorText("Object");
#if WITH_EDITOR
const UObject* DefaultObject = Actor.GetClass()->GetDefaultObject();
if (DefaultObject == nullptr)
{
ImGui::BeginDisabled();
}
if (ImGui::Button("Browse To Asset", ImVec2(-1, 0)))
{
IAssetTools::Get().SyncBrowserToAssets({ DefaultObject });
}
if (DefaultObject == nullptr)
{
ImGui::EndDisabled();
}
FCogWindowWidgets::OpenObjectAssetButton(&Actor, ImVec2(-1, 0));
#endif
if (ImGui::Button("Delete", ImVec2(-1, 0)))