Mirror of Svelto.ECS because we're a fan of it
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
781B

  1. using System.Runtime.CompilerServices;
  2. namespace Svelto.ECS
  3. {
  4. public partial class EntitiesDB
  5. {
  6. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  7. //Todo I should rename this method to reflect it's original intention
  8. public void PublishEntityChange<T>(EGID egid) where T : unmanaged, IEntityComponent
  9. {
  10. //Note: it is correct to publish the EGID at the moment of the publishing, as the responsibility of
  11. //the publisher consumer is not tracking the real state of the entity in the database at the
  12. //moment of the consumption, but it's instead to store a copy of the entity at the moment of the publishing
  13. _entityStream.PublishEntity(ref this.QueryEntity<T>(egid), egid);
  14. }
  15. }
  16. }