unitools-build icon indicating copy to clipboard operation
unitools-build copied to clipboard

Feat: Copy several files to destination directory (optionally)

Open MoxieWhimsy opened this issue 2 years ago • 1 comments

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.

MoxieWhimsy avatar May 10 '23 03:05 MoxieWhimsy

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.

MoxieWhimsy avatar May 25 '24 02:05 MoxieWhimsy