Last active
January 30, 2017 17:05
-
-
Save michaelbartnett/88dabe6460b0d00ae844e0d786cf0071 to your computer and use it in GitHub Desktop.
List unused layers in a Unity project that uses text serialization
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ag --nobreak --nofilename --nogroup '\Wm_Layer: \d+$' | | |
sed -E 's/[ \t]*m_Layer: ([0-9]+)/\1/g' | | |
python3 -c 'import sys; \ | |
used_layers = frozenset(map(int, sys.stdin.readlines())); \ | |
free_layers = sorted([layer for layer in (frozenset(range(32)) - used_layers) if layer > 7]); \ | |
print("Free layers:", ", ".join(map(str, free_layers)))' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment