DefaultEcs
DefaultEcs copied to clipboard
reduce memory usage of tag component type
memory usage of tag component type could be reduced to 0 by just using the ComponentFlag, that would mean those group of functions would behave the same for flag type set flag
- Entity.Set<>
- Entity.SetSameAs<>
- Entity.Enable<>
remove flag
- Entity.Remove<>
- Entity.Disable<>
check flag
- Entity.Has<>
- Entity.IsEnabled<>
Entity.Get<> would be useless (well it is already is anyway for flag types), forbidden even!
This special behavior might be worth it as we would save 3int of memory for each entity and each flag type. Still on the fence to do it or not.