Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
T-rvw committed Sep 18, 2023
1 parent 7323ea2 commit b26ec54
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Engine/Source/Editor/UILayers/Inspector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,13 @@ void UpdateComponentWidget<engine::MaterialComponent>(engine::SceneWorld* pScene

if (isOpen)
{
ImGui::Image(reinterpret_cast<ImTextureID>(pTextureInfo->textureHandle), ImVec2(64, 64));
if (pTextureInfo->textureHandle != bgfx::kInvalidHandle)
{
ImGui::Image(reinterpret_cast<ImTextureID>(pTextureInfo->textureHandle), ImVec2(64, 64));
}

ImGui::PushID(textureTypeValue);
ImGuiUtils::ImGuiVectorProperty("UV Offset", pTextureInfo->GetUVOffset());
ImGuiUtils::ImGuiVectorProperty("UV Offset", pTextureInfo->GetUVOffset(), cd::Unit::None, cd::Vec2f(0.0f), cd::Vec2f(1.0f), false, 0.01f);
ImGuiUtils::ImGuiVectorProperty("UV Scale", pTextureInfo->GetUVScale());
ImGui::PopID();
}
Expand Down

0 comments on commit b26ec54

Please sign in to comment.