SceneGate / Yarhl

Framework for the implementation of format converters like game assets or media files
https://scenegate.github.io/Yarhl/
MIT License
60 stars 10 forks source link

Stream overloads in BinaryFormat and NodeFactory and fix threading issue #163

Closed pleonex closed 3 years ago

pleonex commented 3 years ago

Description

Add a signature support in the constructor of BinaryFormat and in the NodeFactory, so migration and compatibility with other frameworks is better.

Also fix a potential threading issue as we were creating another StreamWrapper when passing DataStream as a regular Stream, so the locker object was different.

Example

Now you can use regular Stream to create a BinaryFormat and a Node.

Related issue #158 +semver: minor