YarnSpinnerTool / YarnSpinner-Unity

The official Unity integration for Yarn Spinner, the friendly dialogue tool.
MIT License
491 stars 85 forks source link

Alias dependency DLLs #210

Closed desplesda closed 1 year ago

desplesda commented 1 year ago

In v2.2.2, Yarn Spinner's dependency DLLs were renamed to have the prefix Yarn. to prevent errors when two DLLs of the same name (e.g. Google.Protobuf.dll) are present in the same project.

This fix solved the edit-time problem, but introduced a new error when the project used Unity's Burst compiler, which looks for DLL files based on their assembly name.

When compiling with Burst, Unity looks for the DLL file based on the name of the assembly, so when it goes searching for (for example) Google.Protobuf, it will only look for the file Google.Protobuf.dll, and not the renamed file.

This causes build failures when the project includes the Burst package.

This change fixes the build failure by modifying the DLL syncing GitHub Action.

This PR introduces no change in behaviour in the Editor or in built players.

It's worth noting that the assembly aliasing is being performed by a third-party tool, so this PR effectively adds dependency on this tool. A potential, but (to this developer) acceptable risk is that the tool becomes unavailable. Additionally, the aliasing tool rewrites DLLs, which introduces a (again, acceptable, in the eyes of this developer) security consideration.