Bump scene document version and update entity comparison
This commit is contained in:
@@ -517,7 +517,7 @@ export function cloneEntityRegistry(entities: Record<string, EntityInstance>): R
|
||||
}
|
||||
|
||||
export function areEntityInstancesEqual(left: EntityInstance, right: EntityInstance): boolean {
|
||||
if (left.kind !== right.kind || left.id !== right.id || !areVec3Equal(left.position, right.position)) {
|
||||
if (left.kind !== right.kind || left.id !== right.id || left.name !== right.name || !areVec3Equal(left.position, right.position)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -30,6 +30,10 @@ export function getEntityDisplayLabel(
|
||||
entities: Record<string, EntityInstance>,
|
||||
assets?: Record<string, ProjectAssetRecord>
|
||||
): string {
|
||||
if (entity.name !== undefined) {
|
||||
return entity.name;
|
||||
}
|
||||
|
||||
const typedEntities = getSortedEntitiesByKind(entities, entity.kind);
|
||||
const entityIndex = typedEntities.findIndex((candidate) => candidate.id === entity.id);
|
||||
const baseLabel = getEntityKindLabel(entity.kind);
|
||||
|
||||
Reference in New Issue
Block a user