Skip to content

Instantly share code, notes, and snippets.

@adrianoc
Last active June 2, 2020 15:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adrianoc/9c94301fe772deea16e844ef4549ce49 to your computer and use it in GitHub Desktop.
Save adrianoc/9c94301fe772deea16e844ef4549ce49 to your computer and use it in GitHub Desktop.
Remove all non script related assets from Unity project
@echo off
for /F "delims=," %%f in ('dir *.psd *.wav *.exr *.ttf *.jpg *.png *.fbx *.mp3 *.mp4 *.shader *.mat *.playable *.controller *.prefab *.unity *.cubemap *.anim *.asset *.hdr *.dds *.max /s /b') do call :remove_non_asset "%%f"
goto :eof
:remove_non_asset
del %1 /s /q
if exist "%~1.meta" del "%~1.meta" /s /q
goto :eof
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment