EcsRx / ecsrx

A reactive take on the ECS pattern for .net game developers
MIT License
520 stars 36 forks source link

IComponentAccessor notion & single target of netstandard 2.0 #30

Closed grofit closed 2 years ago

grofit commented 2 years ago

Thanks to @thejayman for pointing out that there was a common scenario where people want to be able to get components from entities in an efficient manner but only have the type available.

While you can manually do the lookup to get the type id and cache it the IComponentAccessor notion provides a streamlined way to do this.

An extension method has been made on the back of the IComponentTypeLookup however you can new them up however you want or implement your own version of it.

This PR also removes explicit support for .net 4.6 in favour of a simpler single target of netstandard2.0