We would like to run a CI job that will come along and find any assets not virtualized that should be so and submit them. I’m looking at the arguments for the UnrealVirtualizationTool and realizing that I’m not entirely sure how to run it in a way that it will effectively run on the entire project but honor the VirtualizationFilterSettings. We have the following settings in our DefaultEngine.ini (only including relevant settings to the question here, but let me know if you need to know more):
[Core.VirtualizationModule]
FilterMode=OptIn
[/Script/Virtualization.VirtualizationFilterSettings]
+IncludePackagePaths="/OurProjectName/Some/Package/Path/"
+IncludePackagePaths="/OurProjectName/Some/Other/Package/Path/"
If I checkout a bunch of assets and run “UnrealVirtualizationTool.exe -Mode=Virtualize -Changelist=12345” it seems to work correctly, where it will only virtualize what’s specified, but is there a way to tell it to attempt to virtualize the entire project (while only actually virtualizing files that are in the included filter paths above and need to be virtualized)?
The goal is to run something like “UnrealVirtualizationTool.exe -Mode=Virtualize” (without a specific Changelist or Path) and end up virtualizing any files in the project that both are in the filtered path and need to be virtualized. I know that’s not valid syntax, but is there a valid syntax that can achieve this? And more importantly, is this something you suggest doing or are we heading down a path we should avoid?
As a follow up question, is it important to have this CI job do a cook of the assets before submitting them to populate our DDC first? We have other CI jobs that cook and will populate the DDC backends, but I worry about the timing window between when a non-virtualized asset is submitted, when this virtualization job runs (which would be fairly quick if not cooking), and when the assets end up being cooked. If someone syncs in the middle (after virtualization but before the slower full cook CI job runs) they risk ending up in a situation where they then have to inflate the files when loading them in the editor, correct?
Thanks for any advice you can offer on this.
Edit: Providing some additional information since I kept experimenting with this. It seems that the -PackageDir arg can be used for this, though it takes an actual file path as opposed to a package mount path (i.e. “d:\projectworkspace\projectname\Content\assetpath” as oppposed to “/ProjectName/AssetPath/”).
I think I can work with this, but I’ve encountered another interesting issue. It seems like it will only try to resolve the p4 client spec correctly if “-Changelist” is provided (which expects a changelist of files to process, not an empty changelist). If I just use “UnrealVirtualizationTool.exe -Mode=Virtualize -Checkout -PackageDir=\path\to\packages” then I’ll get Source Control errors about an ambiguous client. This makes sense as I have multiple client specs that it could match, but I do have a valid .p4config file that shows correctly in “p4 set” so I’m not sure why it won’t pick up on that. I tried passing -P4Client arg to it, but it doesn’t seem to respect that arg.