- Home /
Question by
Retinad · Aug 26, 2017 at 06:41 PM ·
buildbuild-errorcloudstreamingassetswrite data
How to add files in Unity Cloud that are not part of the Git repository?
I want to write a new file to the StreamingAssets folder before compiling it using Unity Cloud. The file doesn't exist into the Git repository.
Is there a way to do that?
So far, I tried to use the Pre-Export hook in the build target options of Unity Cloud. The method is triggered successfully but when I'm trying to write a file into the StreamingAssets folder, it crashes.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PreExport {
#if UNITY_CLOUD_BUILD
static public void Setup(UnityEngine.CloudBuild.BuildManifestObject manifest)
{
string filePath = System.IO.Path.Combine(Application.streamingAssetsPath, "test.txt");
System.IO.File.WriteAllText(filePath, "1234567890");
}
#endif
}
The error I get is :
ERROR: Caught exception invoking method 'Setup': parameters do not match signature
The error message seems misleading because, if I only Debug.Log() something in it, it works well on the Unity Cloud... Any help on how the Unity Cloud file system work and its limitations can be helpful to me.
Thanks
Comment