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.

32 lines
642B

  1. #if UNITY_5 || UNITY_5_3_OR_NEWER
  2. using Svelto.ECS.Hybrid;
  3. using UnityEngine;
  4. namespace Svelto.ECS.Extensions.Unity
  5. {
  6. public interface IEGIDHolder
  7. {
  8. EGID ID { set; }
  9. }
  10. public struct EGIDTrackerViewComponent : IEntityViewComponent
  11. {
  12. #pragma warning disable 649
  13. public IEGIDHolder holder;
  14. #pragma warning restore 649
  15. EGID _ID;
  16. public EGID ID
  17. {
  18. get => _ID;
  19. set => _ID = holder.ID = value;
  20. }
  21. }
  22. public class EGIDHolderImplementor : MonoBehaviour, IEGIDHolder, IImplementor
  23. {
  24. public EGID ID { get; set; }
  25. }
  26. }
  27. #endif