fix issue with reading pending component
parent
df27c78e02
commit
1ce6e0e907
|
@ -223,7 +223,18 @@ namespace Encompass
|
|||
var existingRead = receiveTypes.Contains(typeof(ComponentMessage<TComponent>));
|
||||
if (existingRead && pendingRead)
|
||||
{
|
||||
return componentMessageManager.ReadPendingComponentByEntityAndType<TComponent>(entity);
|
||||
if (componentMessageManager.HasPendingComponent<TComponent>(entity))
|
||||
{
|
||||
return componentMessageManager.ReadPendingComponentByEntityAndType<TComponent>(entity);
|
||||
}
|
||||
else if (componentMessageManager.HasExistingComponent<TComponent>(entity))
|
||||
{
|
||||
return componentMessageManager.ReadExistingComponentByEntityAndType<TComponent>(entity);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new NoComponentOfTypeOnEntityException("No Component of type {0} exists on Entity {1}", typeof(TComponent).Name, entity.ID);
|
||||
}
|
||||
}
|
||||
else if (existingRead)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue