internal static void InstallStreamingAssets(string stagingAreaDataPath)
 {
     if (Directory.Exists("Assets/StreamingAssets"))
     {
         FileUtil.CopyDirectoryRecursiveForPostprocess("Assets/StreamingAssets", Path.Combine(stagingAreaDataPath, "StreamingAssets"), true);
     }
 }
 internal static void InstallStreamingAssets(string stagingAreaDataPath, BuildReport report)
 {
     if (Directory.Exists("Assets/StreamingAssets"))
     {
         string target = Path.Combine(stagingAreaDataPath, "StreamingAssets");
         FileUtil.CopyDirectoryRecursiveForPostprocess("Assets/StreamingAssets", target, true);
         if (report != null)
         {
             report.AddFilesRecursive(target, "Streaming Assets");
         }
     }
 }
 internal static void InstallStreamingAssets(string stagingAreaDataPath, BuildReport report)
 {
     if (Directory.Exists(StreamingAssets))
     {
         var outputPath = Path.Combine(stagingAreaDataPath, "StreamingAssets");
         FileUtil.CopyDirectoryRecursiveForPostprocess(StreamingAssets, outputPath, true);
         if (report != null)
         {
             report.RecordFilesAddedRecursive(outputPath, CommonRoles.streamingAsset);
         }
     }
 }
        internal static void InstallStreamingAssets(string stagingAreaDataPath, string streamingAssetsFolderName, BuildReport report)
        {
            if (Directory.Exists(StreamingAssets))
            {
                var outputPath = Path.Combine(stagingAreaDataPath, streamingAssetsFolderName);
                FileUtil.CopyDirectoryRecursiveForPostprocess(StreamingAssets, outputPath, true);
                report?.RecordFilesAddedRecursive(outputPath, CommonRoles.streamingAsset);
            }

            foreach (var(dst, src) in BuildPlayerContext.ActiveInstance.StreamingAssets)
            {
                NPath targetPlayerPath = $"{stagingAreaDataPath}/{streamingAssetsFolderName}/{dst}";
                if (targetPlayerPath.Exists())
                {
                    var errorMessage =
                        "error: Callback provided streaming assets file conflicts with file already present in project." +
                        $" Project file 'StreamingAssets/{dst}'. Callback provided file '{src}'.";
                    Debug.LogError(errorMessage);
                    throw new BuildFailedException(errorMessage);
                }
                FileUtil.UnityFileCopy(src.ToString(), targetPlayerPath.EnsureParentDirectoryExists().ToString());
                report?.RecordFileAdded(targetPlayerPath.ToString(SlashMode.Native), CommonRoles.streamingAsset);
            }
        }