SixWays / UnityShaderStripper

Modular utilities for shader stripping to drastically improve Unity build times
MIT License
351 stars 42 forks source link

Repo Maintenance #10

Open Grimeh opened 4 months ago

Grimeh commented 4 months ago

Hey there,

First off, thanks for writing this plugin. When it works it's awesome. A fast and effective way to reduce runtime memory usage and build times when used carefully.

However it seems that the repo hasn't been maintained since ~2019. Are you open to adding a maintainer or two to help keep it working smoothly?

The currently pending PRs are essential to get this plugin in a workable state, and so far I've found two YAML parsing errors that cause USS to fall over at build time (exceptions in Initialize). I assume Unity's YAML serialiser has gradually changed over the years, causing the parser to fail past a certain version.

DarwinAnim8or has a fork that merges in the PRs, which gets it mostly up and working (thanks DarwinAnim8or!). However those YAML parsing errors mean even that fork will almost certainly not work for recent versions of Unity (we found them in 2021 at the very least) since multi-line inline objects seem to be very common in our .shadervariants file. You'd have to be extremely lucky to get all inline objects serialised on the same line for the lines beginning with - first:.

I would love to get those PRs merged in and fix up the parsing bugs I've found.

In the meantime, I'm going to open PRs for each parsing bug and open a fork with them pre-applied, in case someone else runs into the same issues and needs a fix (and maybe isn't confident enough with git to apply the PR patches themselves). EDIT: Fork located here.

Thanks, Brandon