unitools-build
unitools-build copied to clipboard
Feat: Copy several files to destination directory (optionally)
This changes the CopyFileToDirectory BuildStep to a CopyFilesToDirectory BuildStep. The OnValidate method is included to copy the m_filePath property from existing CopyFileToDirectory scriptable objects into the m_filePaths property.
OK. Looking back at this commit, I overcomplicated adding this BuildStep and that led to other extra lines and methods.
It looks like I deliberately gave the new step the same meta file and guid as the previous CopyFileToDirectory because (at least at the time) Unity used the guid to identify ScriptableObject instances. I'm not sure if this step would have been sufficient to prevent old piplelines from breaking. I likely tested it only on my own pipleline.
I'll refactor to not remove the existing step.