Fixed editor component fields with the same name across components being treated as the same value
This commit is contained in:
@@ -492,7 +492,8 @@ void EditorSystem::drawUI(World* world, double dt)
|
|||||||
const std::string& fieldName = kv.first;
|
const std::string& fieldName = kv.first;
|
||||||
auto& field = kv.second;
|
auto& field = kv.second;
|
||||||
|
|
||||||
ImGui::PushID(fieldName.c_str());
|
std::string uniqueID = componentType + fieldName;
|
||||||
|
ImGui::PushID(uniqueID.c_str());
|
||||||
if (field.Type == "Vector") {
|
if (field.Type == "Vector") {
|
||||||
auto& val = component.Property<glm::vec3>(fieldName);
|
auto& val = component.Property<glm::vec3>(fieldName);
|
||||||
if (fieldName == "Scale") {
|
if (fieldName == "Scale") {
|
||||||
|
|||||||
Reference in New Issue
Block a user