Move value updation into the if block

This commit is contained in:
yutopp
2019-03-13 19:58:08 +09:00
parent c56ca52bbb
commit 0c147dd1fb

View File

@@ -27,8 +27,9 @@ namespace VRM
if (EditorGUI.EndChangeCheck())
{
Undo.RecordObject(component, "Changed FirstPerson");
component.FirstPersonOffset = head.worldToLocalMatrix.MultiplyPoint(worldOffset);
}
component.FirstPersonOffset = head.worldToLocalMatrix.MultiplyPoint(worldOffset);
}
}
}