Skip to content

Instantly share code, notes, and snippets.

@rokups
Created December 26, 2018 17:24
Show Gist options
  • Save rokups/4cd8a4ebaf4235f7e4a0c7167c68d030 to your computer and use it in GitHub Desktop.
Save rokups/4cd8a4ebaf4235f7e4a0c7167c68d030 to your computer and use it in GitHub Desktop.
[
{
"type": "glob",
"comment": "Convert fbx",
"flags": ["online"],
"glob": "Models/**/*.fbx",
"output": [
{
"type": "subprocess",
"comment": "Import models",
"exec": "AssetImporter",
"args": [
"model",
"{resource-path}",
"Cache/{resource-name}",
"-na",
"-ns"
]
},
{
"type": "subprocess",
"comment": "Import animations",
"exec": "AssetImporter",
"args": [
"anim",
"{resource-path}",
"Cache/{resource-name}",
"-nm",
"-nt",
"-nc",
"-ns"
]
}
]
},
{
"type": "glob",
"comment": "Convert wavs",
"flags": ["offline"],
"glob": "**/*.wav",
"output": {
"type": "subprocess",
"exec": "ffmpeg",
"args": [
"-i", "{resource-path}",
"-c:a", "libvorbis",
"-q:a", "4",
"Cache/{resource-name}"
]
}
},
{
"type": "glob",
"comment": "Cook scenes",
"flags": ["offline"],
"glob": "Scenes/*.xml",
"output": {
"type": "subprocess",
"exec": "{editor}",
"args": [
"--headless",
"--nothreads",
"--log error",
"--log-file", "/dev/null",
"--converter", "CookScene",
"--converter-input", "{resource-path}",
"--converter-output", "Cache/{resource-name}",
"{project-path}"
]
}
},
{
"type": "glob",
"comment": "Compress textures",
"flags": ["offline"],
"glob": [
"Textures/*.png"
],
"output": [
{
"type": "filter",
"filter": {
"has_tag": "alpha",
"output": {
"type": "subprocess",
"exec": "crunch",
"args": [
"-ETC2A",
"-file", "{resource-path}",
"-out", "Cache-Android-GLES3/{resource-name}"
]
}
}
},
{
"type": "filter",
"filter": {
"!has_tag": "alpha",
"output": {
"type": "subprocess",
"exec": "crunch",
"args": [
"-ETC2",
"-file", "{resource-path}",
"-out", "Cache-Android-GLES3/{resource-name}"
]
}
}
}
]
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment