decline-cookies / anvil-unity-dots

Unity DOTS and ECS specific additions and extensions to Anvil
MIT License
4 stars 1 forks source link

`CDFEWriter` - Allow to masquerade as a reader #294

Closed mbaker3 closed 9 months ago

mbaker3 commented 9 months ago

Add an AsReadOnly() method to CDFEWriter. This helps the instance conform to APIs that are expecting CDFEReaders.

What is the current behaviour?

If the developer has a CDFEWriter there is no way to use it for APIs that require CDFEReader instances.

What is the new behaviour?

Developers can call AsReadOnly on a CDFEWriter to have it be used purely as a reader.

What issues does this resolve?

What PRs does this depend on?

Does this introduce a breaking change?