mirror of
https://github.com/Ed94/Cog.git
synced 2026-08-03 22:28:45 +00:00
CogAbility: Add open asset button on effect and abilities context menu
This commit is contained in:
@@ -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)))
|
||||
|
||||
Reference in New Issue
Block a user