Virtual Assets separate assets information into two parts, only metadata exists in the source stream, while the main part of the asset’s data, held in other place.
So how to merge the asset to another stream when metadata are different on different streams? Direct merging will encounter data inconsistency issues
Assuming from your diagram that //depot/main/myproject/… and //depot/dev/myproject/… are the same project but at different stages of development and assuming that they both have virtualized assets enabled and are ultimately storing their payloads in //depot/vadata/… as persistent storage then there should be no special considerations when merging assets between the streams.
As an example, lets assume there are currently 4 revisions of test.asset in dev, all of which have been integrated to main either one by one, robomerge style or via p4 copy. If I were then to edit the asset in dev in a way that changed the bulkdata data payload (import a new version of the texture data perhaps) and submit to dev, I will end up virtualizing that new data and creating revision number 5. If I were to then integrate/merge that new revision to main, the reference to the virtualized data is inside the .uasset file itself, so the editor in main will have all the info it needs to find that payload in //depot/vadata
Some users have seen problems though when trying to merge/copy uasset files from a virtualized project to a completely different project that is using a different location for storing virtualized data or to a different project/branch that does not have virtualization enabled at all. I do have plans to introduce a more artist friendly pipeline for this (via the asset import system) but for now the only way to do that is quite fiddly.
The most basic method involves rehydrating the file in the source project (which knows where the virtualized data is) via UnrealVirtualizationTool’s rehydrate command, then copy or integrate that file then revert the change in the source project. Either that or you’d need to set up a VA graph in the target project that knows where the other project stores the data, then integrate/copy the virtualized file then rehydrate it in the target project using this additional graph.
Yes, I did think about it through the editor, because the editor can handle everything automatically. But for some cases it involves merging through p4, such as robomerge tool, which can automatically merge between branches. So I hope to be able to complete this process automatically. A VA graph can indeed achieve consistency, but it is a last resort. However, I’ll have a try in this way.
If there is a good solution someday, please let me know.