- 修复 EntityBinding.cs 的字典不一致问题
This commit is contained in:
@@ -32,6 +32,12 @@ namespace Simulation
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_simulationIndexToEntityId.TryGetValue(newSimulationIndex, out int oldEntityId) &&
|
||||||
|
oldEntityId != entityId)
|
||||||
|
{
|
||||||
|
_entityIdToSimulationIndex.Remove(oldEntityId);
|
||||||
|
}
|
||||||
|
|
||||||
_simulationIndexToEntityId.Remove(oldSimulationIndex);
|
_simulationIndexToEntityId.Remove(oldSimulationIndex);
|
||||||
_entityIdToSimulationIndex[entityId] = newSimulationIndex;
|
_entityIdToSimulationIndex[entityId] = newSimulationIndex;
|
||||||
_simulationIndexToEntityId[newSimulationIndex] = entityId;
|
_simulationIndexToEntityId[newSimulationIndex] = entityId;
|
||||||
|
|||||||
Reference in New Issue
Block a user