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.

22 lines
494B

  1. namespace Svelto.ECS.Experimental
  2. {
  3. public struct ECSString
  4. {
  5. internal uint id;
  6. ECSString(uint toEcs)
  7. {
  8. id = toEcs;
  9. }
  10. public static implicit operator string(ECSString ecsString)
  11. {
  12. return ResourcesECSDB<string>.FromECS(ecsString.id);
  13. }
  14. public static implicit operator ECSString(string text)
  15. {
  16. return new ECSString(ResourcesECSDB<string>.ToECS(text));
  17. }
  18. }
  19. }